How can I create/get a Channel but no through function of playSound

How can I create/get a Channel but no through function of playSound? I don’t want to play a sound but I need to get the Channel,How can I do for it?

I know there is a function of getChannel that can receive the channel by channelid,but I don’t know what’s the channelid

Channels aren’t assigned to sounds until playSound is called.

A single Sound can be playing on multiple Channels at the same, but a Channel will only have one Sound playing on it. This is why you can get the Sound from a Channel (Channel::getCurrentSound) but cannot get the Channel from a Sound.

Think of the Sound almost as a blueprint or template, and the Channel as a playing instance of the Sound. Each time you call playSound, FMOD will assign a different Channel from the pool of available Channels to play an instance of your Sound on.

1 Like

Oh!The answer is very detailed!Thank you very much!

Channels aren’t assigned to sounds until playSound is called.
声音播放后Channels 才被创建出来 ,那么给Channels 设置循环或者音量等参数还有什么意义呢?

The Channel is that instance of an event, you can change properties of it without affecting the original event. You may only want to change the looping behavior or volume of that one instance, all these things can be changed at any time while the Channel is still valid.

1 Like