Class: FMOD::Dsp::ChannelFormat

Inherits:
Struct
  • Object
show all
Defined in:
lib/fmod/dsp.rb

Overview

Defines the signal format of a dsp unit so that the signal is processed

on the speakers specified, as well as the number of channels in the unit
that a read callback will process, and the output signal of the unit.

Setting the number of channels on a unit will force a down or up mix to that channel count before processing the DSP read callback. This count is then sent to the outputs of the unit.

The speaker mode is informational, when the mask describes what bits are active, and the channel count describes how many channels are in a buffer, speaker mode describes where the channels originated from. For example if the channel count is 2 then this could describe for the DSP if the original signal started from a stereo signal or a 5.1 signal.

It could also describe the signal as all monaural, for example if the channel count was 16 and the speaker mode was Core::SpeakerMode::MONO.

Instance Attribute Summary collapse

Instance Attribute Details

#countInteger

The number of channels to be processed on this unit and sent to the outputs connected to it. Maximum of MAX_CHANNEL_WIDTH.

Returns:

  • (Integer)

    the current value of count



59
60
61
# File 'lib/fmod/dsp.rb', line 59

def count
  @count
end

#maskInteger

A series of bits specified by Core::ChannelMask to determine which speakers are represented by the channels in the signal.

Returns:

  • (Integer)

    the current value of mask



59
60
61
# File 'lib/fmod/dsp.rb', line 59

def mask
  @mask
end

#speaker_modeInteger

The source speaker mode where the signal came from.

Returns:

  • (Integer)

    the current value of speaker_mode



59
60
61
# File 'lib/fmod/dsp.rb', line 59

def speaker_mode
  @speaker_mode
end