lib/batch_audio_convert/audio_utils.rb
# flac to whatever block statement you provide
# In two steps:
#  1. flac to wav
#  2. wav to whatever
flac to whatever block statement you provide
In two steps:
1. flac to wav
2. wav to whatever
flac to whatever block statement you provide In two steps : 1 . flac to wav 2 . wav to whatever
def flac_to (origin, destination)
    puts_and_logs "Transforming \"#{origin}\" into \"#{destination}\"."
    return if config[:simulate]
    unless should_process_file? destination
      puts_and_logs ' - File exists. Skipping transformation...'
      return
    end
    verify_destination_folder(destination)
    begin
      temp_file = Tempfile.new(self.class.name)
      temp_file.close
      tags = flac_tags(origin)
      run_command build_flac_cmd(origin, temp_file.path)
      yield temp_file, tags
      puts_and_logs ' - Done'
    ensure
      temp_file.unlink
    end
  end
def flac_to ( origin , destination ) puts_and_logs "Transforming \"#{origin}\" into \"#{destination}\"." return if config [ :simulate ] unless should_process_file? destination puts_and_logs ' - File exists. Skipping transformation...' return end verify_destination_folder ( destination ) begin temp_file = Tempfile . new ( self . class . name ) temp_file . close tags = flac_tags ( origin ) run_command build_flac_cmd ( origin , temp_file . path ) yield temp_file , tags puts_and_logs ' - Done' ensure temp_file . unlink end end
flac to whatever block statement you provide
In two steps:
1. flac to wav
2. wav to whatever
flac to whatever block statement you provide In two steps : 1 . flac to wav 2 . wav to whatever
origin
destination