sound_stop_all();
Returns: N/A
With this function you can stop not just one sound, but
all sounds that are currently being played (or looped) in
the current room, irrespective of the instance that is playing
them, or the instance that is running this function.
if keyboard_check_pressed(ord("M"))
{
global.Sound = false;
sound_stop_all();
}
The above code will check for a press of the keyboard and if it detects one it will set a global variable and stop all sounds.