icanhasaudio version 0.1.0 has been released!
Hai! icanhasaudio? is an interface to lame for decoding ur MP3s. I iz
in ur
computer. Decodin ur mp3s. Whatevs! I also decodin ur OGGz! I kin
also
encodin’ ur WAV and AIFF to mp3z!
SYNOPSYS ROFLOL
require ‘icanhasaudio’
reader = Audio::MPEG::Decoder.new
File.open(ARGV[0], ‘rb’) { |input_lol|
File.open(ARGV[1], ‘wb’) { |output_lol|
reader.decode(input_lol, output_lol)
}
}
Or even smaller:
reader = Audio::OGG::Decoder.new
reader.decode(File.open(ARGV[0], ‘rb’), File.open(ARGV[1], ‘wb’))
Encoder!!! LOL
writer = Audio::MPEG::Encoder.new
File.open(ARGV[0]), ‘rb’) { |wav_lol|
File.open(ARGV[1]), ‘wb+’) { |mp3_lol|
writer.encode(wav_lol, mp3_lol)
}
}
Changes:
0.1.0
-
1 major enhancement
- Added MPEG Encoder