Sets the bit mask for a given emitter, defining the listeners to play it to.


audio_emitter_set_listener_mask(emitterID, mask);

Argument Description
emitterID The unique ID of the emitter to set the mask of
mask The bitmask data to set for the sound

Returns: N/A


This function can be used to set the the bit-mask for an emitter so that all sounds played through the emitter will play only from those listeners specified. You can create a bit-mask by using the audio_get_listener_info() and then using the bitwise or ("|") to create a custom mask with those listeners that you require the sound to play from, and then apply this custom mask to the emitter. This mask will over-ride the default mask or that which you may have set using the function audio_set_listener_mask().


s_emit = audio_emitter_create();
audio_emitter_set_listener_mask(snd, global.PlayerMask);

The above code creates an audio emitter and then sets the listener(s) to play from using the mask data stored in a global variable.

Back: Audio Listeners
Next: audio_get_listener_mask
© Copyright YoYo Games Ltd. 2018 All Rights Reserved