Class: MusicMaster::Processes::ApplyVolumeFct

Inherits:
Object
  • Object
show all
Includes:
WSK::Common
Defined in:
lib/MusicMaster/Processes/ApplyVolumeFct.rb

Instance Method Summary collapse

Instance Method Details

#execute(iInputFileName, iOutputFileName, iTempDir, iParams) ⇒ Object

Execute the process

Parameters
  • iInputFileName (String): File name we want to apply effects to

  • iOutputFileName (String): File name to write

  • iTempDir (String): Temporary directory that can be used

  • iParams (map<Symbol,Object>): Parameters



29
30
31
32
33
34
35
36
# File 'lib/MusicMaster/Processes/ApplyVolumeFct.rb', line 29

def execute(iInputFileName, iOutputFileName, iTempDir, iParams)
  # Create the file that will store the Function for WSK
  lFunctionFile = "#{iTempDir}/#{File.basename(iInputFileName)[0..-5]}.fct.rb"
  lFunction = WSK::Functions::Function.new
  lFunction.set(iParams[:Function])
  lFunction.write_to_file(lFunctionFile)
  wsk(iInputFileName, iOutputFileName, 'ApplyVolumeFct', "--function \"#{lFunctionFile}\" --begin \"#{iParams[:Begin]}\" --end \"#{iParams[:End]}\" --unitdb #{(iParams[:DBUnits]) ? '1' : '0'}")
end