0
0

Hello All,

I have specific situation where I need to target specific hardware channel on soundcard with 8 channels. IS this something I can do with FMOD? I loked through the examples and could only see a spot that may work in system.playSound with the text:

[i:1a7lmcl8]channelid[/i:1a7lmcl8]
Use the value FMOD_CHANNEL_FREE to get FMOD to pick a free channel. Otherwise specify a channel number from 0 to the ‘maxchannels’ value specified in System::init minus 1.

But, when I go to use playSound and specify channel, it expects FMOD_CHANNELINDEX which is enum.

Does anyone have any idea why or if this is the wrong direction? Thanks for the helpz.

TW

  • You must to post comments
0
0

FMOD_CHANNELINDEX is defined like this:
[code:1uxswsti]
typedef enum
{
FMOD_CHANNEL_FREE = -1, /* For a channel index, FMOD chooses a free voice using the priority system. /
FMOD_CHANNEL_REUSE = -2 /
For a channel index, re-use the channel handle that was passed in. */
} FMOD_CHANNELINDEX;
[/code:1uxswsti]

So it is safe to assume that you could get channels from 0 to maxchannels -1 without using the free or reuse option by mistake. Have you tried casting it to FMOD_CHANNELINDEX?

  • You must to post comments
0
0

Hi tumbleweed, welcome to the FMOD Forums.

I think there is a slight misunderstanding here due to the slightly ambiguous use of the word ‘channel’. In FMOD the channel object is different to the ‘channel’ for say a multi channel sound card in your case. The FMOD Channel object is just an instance of a sound that is playing. So a Sound is played using playSound and the playback can then be controlled using the Channel object that is created.

In answer to your specific question, you can control the routing of audio to specific speakers using Channel::setSpeakerMix. There is also Channel::setSpeakerLevels for more advanced control allowing you to control the mix matrix of inputs to outputs and supporting up to 16 speakers.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.