#require 'rubygems' #require_gem "rb_cdio",">=0.0.3" require "../ext/rb_cdio" 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"); if (cd.discmode==CdIo::CDIO_DISC_MODE_CD_DA) puts "CDTEXT" p cd.get_cdtext #puts "Cddb: "+cd.cddb_id #freedb=cd.get_freedb #freedb.fetch #freedb.results.each { |r| puts r } #puts "Pistas = \n" end cd.get_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" p track.get_cdtext end puts "Format: "+CdIo.track_format_describe(track.format); puts "Type: "+CdIo.track_type_describe(track); puts track.msf } }