Questions about channels.

Hi,

I have a few questions about the Unity integration. I’m currently using the 1.03.06 version.

  • Is there a way to cap the maximum number of channels that the entire game will have? If it already exists, where can I read/write it?
  • I’m a bit confused about how the “voice stealing” really works. It seems that it steal channels from any event with priority equal or lower to the event being fired. If this is true, how can I make the event steal channels only from those playing the same event?

Hi dnishimura,

Those are some excellent questions, channel and instance management is a bit involved so I will endeavour to explain it all in detail.

Firstly I would like to make the distinction between event instances and low level channels.

Low Level Channels
The low level has the concept of a channel which is a single playing sound, it has a virtualization system where only the loudest channels are audible. There are two number of factors which determine the maximum number of audible channels. These are configurable but must be set before calling System.init / Studio.System.initalize.

“Software” Channels
Software channels represent a sound that is really playing and audible. This can be configured using System.setSoftwareChannels, it defaults to 64 which is pretty good generally.

Codecs
You can also set limits on the number of codecs (e.g. Vorbis/MP3/ADPCM), a codec will be consumed if you are playing a sound as a compressed sample. In Studio all sounds are loaded as compressed sample unless they are on a track which is set to “stream”. The number of codecs can be configured using System.setAdvancedSettings, it defaults to 32 of each codec.

Studio Event Instances
Studio has a voice limiting system on top of the low level channel system for limiting the number of instances of a given a event are audible at a given time. This can be configured from the event macros panel by setting the Max Voices dial in the Polyphony section. It defaults to infinity, which means there is no voice limiting. There is also the “Voice Stealing” option which defines the behavior when the voice limit is exceeded, if it is set to ON the quietest event instance will be muted, if it’s set to OFF, the newest event instance will fail to start.

If there are many sounds which need be playing at the same time,is the number of Software Channels enough? Does playing a sound need one Software Channel at least? How can I set the the number of limited instences and how can I set the "Voice Stealing"to ON or OFF?

Hi Peter,
Thank you for shedding a light on the subject. It was really helpful.