Note that when dealing with priority, the higher the number the higher the priority, such that a sound with priority 100 will be favoured over a sound with priority 1. Lower priority sounds will be stopped in favour of higher priority sounds, and the priority value can be any real number (the actual value is arbitrary, and can be from 0 to 1 or 0 to 100, as GameMaker will prioritize them the same). This priority is then used to determine how sounds are dealt with when the number of sounds playing is over the limit set by the function audio_channel_num(). The next two arguments are to set the sound is to loop or not and for assigning a priority to the sound.
![gamemaker studio 2 sound gamemaker studio 2 sound](https://chlorinestrips.com/images/game-maker-studio-2-manual-download-4.png)
The default factor is normally 1, and the effect of the different falloff values will depend on the model chosen (for a complete guide to the different falloff models and how these values are used, please see the function audio_falloff_set_model()). How the fade itself is heard will depend on the falloff reference (which is the distance under which the volume for the source would normally drop by half) and the roll off factor (which affects the sound past the falloff reference distance only). You can also set a fall-off distance (0 will make the sound silent, default is 100) which will make the sound fade out as it gets further from the listener position. The default listener position is (0, 0, 0) so this means that if the listener has not been moved and you want the sound to come from the left (for example), you should set the x position to a negative value (for more information on setting the listener position see audio_listener_position()).
![gamemaker studio 2 sound gamemaker studio 2 sound](https://i.ytimg.com/vi/IZXhw1-iKV8/maxresdefault.jpg)
You provide the sound index and then assign it a position within the 3D space.
![gamemaker studio 2 sound gamemaker studio 2 sound](https://i.ytimg.com/vi/r1EtDIuvYNU/maxresdefault.jpg)
With this function you can play any sound resource at a given position within the audio space.