audio_pause_sync_group

Pause a synchronised group of tracks that are currently playing.

Syntax:

audio_pause_sync_group(group_index);


Argument Description
group_index The group index to pause.


Returns: N/A


Description

This function will pause the given sync group if it is playing, with the group index being the value returned when you created the group using the function audio_create_sync_group(). This does not stop the sound, and calling audio_resume_sync_group(), will start it playing from the same position it was paused at again.


Example:

if (keyboard_check_pressed((ord)"P"))
   {
   global.Pause = !global.Pause
   if global.Pause
      {
      audio_pause_sync_group(sg);
      }
   else
      {
      audio_resume_sync_group(sg);
      }
   }

The above code checks for a key press of the "P" key, and if one is detected it toggles the "global.Pause" variable then checks it to pause or resume the sync group indexed in the variable "sg".


Back: Audio Synchronisation
Next: audio_resume_sync_group
© Copyright YoYo Games Ltd. 2018 All Rights Reserved