audio_emitter_get_gain

Returns the current gain of a given emitter.

Syntax:

audio_emitter_get_gain(emitter);


Argument Description
emitter The index of the emitter to use.


Returns: Real


Description

This function returns the current gain (volume) set for the given audio emitter, a value between 0 and 1.


Example:

if audio_emitter_get_gain(emitter_player) < 1
   {
   audio_emitter_gain(emitter_player, 1);
   }

The above code checks the current gain of a given emitter and if it is less than 1 it is set to 1.


Back: Audio Emitters
Next: audio_emitter_get_pitch
© Copyright YoYo Games Ltd. 2018 All Rights Reserved