With this function you can set how many audio channels are available for playing audio in GameMaker Studio 2. What this basically means is that you give the number of simultaneous sounds that can be played at any one time, and if the number exceeds the amount, those sounds with a lower priority are stopped to free up a channel for the sounds with a higher priority. You can use this function to optimise your game for devices as the lower the number of channels for audio the better the performance, but bear in mind that this may also cause noticeable cut off of certain sounds if many are played at once.
|num||Number of available audio channels (default is 128).|
The above code checks the platform that the game is running on and changes the number of available sound channels to increase performance.