Class: WSK::Actions::Identity

Inherits:
Object
  • Object
show all
Defined in:
lib/WSK/Actions/Identity.rb

Instance Method Summary collapse

Instance Method Details

#execute(iInputData, oOutputData) ⇒ Object

Execute

Parameters
  • iInputData (WSK::Model::InputData): The input data

  • oOutputData (Object): The output data to fill

Return
  • Exception: An error, or nil if success



31
32
33
34
35
36
37
# File 'lib/WSK/Actions/Identity.rb', line 31

def execute(iInputData, oOutputData)
  iInputData.each_raw_buffer do |iInputRawBuffer, iNbrSamples, iNbrChannels|
    oOutputData.pushRawBuffer(iInputRawBuffer)
  end

  return nil
end

#get_nbr_samples(iInputData) ⇒ Object

Get the number of samples that will be written. This is called before execute, as it is needed to write the output file. It is possible to give a majoration: it will be padded with silence.

Parameters
  • iInputData (WSK::Model::InputData): The input data

Return
  • Integer: The number of samples to be written



20
21
22
# File 'lib/WSK/Actions/Identity.rb', line 20

def get_nbr_samples(iInputData)
  return iInputData.NbrSamples
end