audio_emitter_position


Description

With this function you can change the position of an audio emitter within the 3D audio space. The position will affect the sound in different ways depending on where the listener is positioned within the audio space too (default position is (0, 0, 0). See audio_listener_position for more information), so for example if the emitter position is set to (100, 0, 0) and the current listener is at (200, 0, 0) the audio streamed from the emitter will appear to be on the left of the audio field. The image below shows a visual representation of emitters and their relative positions to the listener:


Syntax:

audio_emitter_position(emitter, x, y, z);


Argument Description
emitter The index of the emitter to change.
x The x position.
y The y position.
z The z position.


Returns:

N/A


Example:

if speed > 0
   {
   audio_emitter_position(s_emit, x, y, 0);
   }

The above code checks to see if the instance speed is over 0 and if it is it updates the audio emitter indexed in the variable "s_emit" to the current x/y position.