Firelight Technologies FMOD Studio API
DSP::setChannelFormat
Sets the signal format of a dsp unit so that the signal is processed on the speakers specified.
Also defines the number of channels in the unit that a read callback will process, and the output signal of the unit.
C++ Syntax
FMOD_RESULT DSP::setChannelFormat(
FMOD_CHANNELMASK channelmask,
int numchannels,
FMOD_SPEAKERMODE source_speakermode
);
C Syntax
FMOD_RESULT FMOD_DSP_SetChannelFormat(
FMOD_DSP *dsp,
FMOD_CHANNELMASK channelmask,
int numchannels,
FMOD_SPEAKERMODE source_speakermode
);
C# Syntax
RESULT DSP.setChannelFormat(
CHANNELMASK channelmask,
int numchannels,
SPEAKERMODE source_speakermode
);
JavaScript Syntax
DSP.setChannelFormat(
channelmask,
numchannels,
source_speakermode
);
Parameters
- channelmask
- A series of bits specified by FMOD_CHANNELMASK to determine which speakers are represented by the channels in the signal.
- numchannels
- The number of channels to be processed on this unit and sent to the outputs connected to it. Maximum of FMOD_MAX_CHANNEL_WIDTH.
- source_speakermode
- The source speaker mode where the signal came from. See remarks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Remarks
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 channelcount is then sent to the outputs of the unit.
source_speakermode is informational, when channelmask describes what bits are active, and numchannels describes how many channels are in a buffer, source_speakermode describes where the channels originated from. For example if numchannels = 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 numchannels was 16 and the speakermode was FMOD_SPEAKERMODE_MONO.
See Also
Version 1.10.03 Built on Feb 1, 2018