Sha256: f5454e4439fe78f2fae080d76cb95cf59485bbfa3b255ec3431b397a539145d8

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

if(File::exists?("../ext/rb_cdio.so"))
	require "../ext/rb_cdio"
else
	require 'rubygems'
	require_gem "rb_cdio",">=0.2"
end
dev=( ARGV[0].nil? ) ? nil:ARGV[0]; 
CdIo.open(ARGV[0]) {|cd|
	puts "Device:"+cd.device
	puts "Mcn:"+cd.mcn.to_s
	puts "Driver Id:"+cd.driver_id.to_s
	puts "Driver Name:"+cd.driver_name.to_s
	puts "First Track Num:"+cd.first_track_num.to_s
	puts "Track number:"+cd.num_tracks.to_s
	puts "Discmode: "+CdIo.discmode_describe(cd.discmode);
	puts "Is Cd?: "+((cd.is_cd? ) ? "Yes" : "No");
	puts "Is Dvd?: "+((cd.is_dvd? ) ? "Yes" : "No");
	cdda=false
	if (cd.discmode==CdIo::CDIO_DISC_MODE_CD_DA)
	puts "CDTEXT: "+cd.cdtext.to_s
	puts "Cddb: "+cd.cddb_id
		begin
			cd.cddb_fetch(1)
			puts "Artist:"+cd.artist
			puts "Title:"+cd.title
			cdda=true
		rescue =>e
			puts "ERROR - Can't get cddb info : "+e.to_s
		end
	end
	cd.tracks.each {|track|
	puts "=========\nTrack number "+track.number.to_s
	puts CdIo.track_format_describe(track.format);
	
	if(cd.discmode==CdIo::CDIO_DISC_MODE_CD_DA) 
	puts "CDTEXT:"+track.cdtext.to_s
	end
	puts "Format:  "+CdIo.track_format_describe(track.format);
	puts "Type: "+CdIo.track_type_describe(track);
	puts "Mfs: "+track.msf
	if(cdda) 
		puts "Title:"+track.title
	end
	}
}



Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
rb_cdio-0.2.0 lib/rb_cdio_read.rb
rb_cdio-0.2.1 lib/rb_cdio_read.rb
rb_cdio-0.2.0 ./lib/rb_cdio_read.rb
rb_cdio-0.2.1 ./lib/rb_cdio_read.rb