Module: AudioUtils
- Included in:
- BatchAudioConvert
- Defined in:
- lib/batch_audio_convert/audio_utils.rb
Constant Summary collapse
- TAGS =
[:title, :artist, :comment, :genre, :album, :track, :year]
- OGG_ENC_CMD =
'oggenc -q##OGGQUALITY## -o "##OGGFILE##" "##WAVFILE##"'- FLAC_DEC_CMD =
'flac -d -f -o "##WAVFILE##" "##FLACFILE##"'- MP3_ENC_CMD =
'lame -h -b ##MP3QUALITY## "##WAVFILE##" "##MP3FILE##"'
Instance Method Summary collapse
Instance Method Details
#flac_to_mp3(origin, destination) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/batch_audio_convert/audio_utils.rb', line 26 def flac_to_mp3 (origin, destination) flac_to origin, destination do |temp_file, | run_command build_mp3_cmd(temp_file.path, destination) destination, end end |
#flac_to_ogg(origin, destination) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/batch_audio_convert/audio_utils.rb', line 19 def flac_to_ogg (origin, destination) flac_to origin, destination do |temp_file, | run_command build_ogg_cmd(temp_file.path, destination) destination, end end |