This function can be used to display debug information about any given sync group (the group index is the value returned when the group was created using the function audio_create_sync_group()). You can call the function with a value of -1 to switch off the overlay.
When you are debugging the audio sync groups, the overlay will show Which sync groups is debugging
- How many channels are in it
- How many times the sync group has failed (this means it's tried to do too much work)
- A list of the channels
- Red means this channel is not currently doing any work
- Yellow means the channel is in initial state (not yet decoding or playing)
- Green means the track is currently seeking/decoding
- Purple means the channel has run out of data
- A profiling bar that shows what work the decoding thread is doing
- blue means a file is being read for the first time
- red means the thread is reading a file to find out where to read from
- green means the thread is decoding data
- purple means the thread is sleeping until it needs to work
Note that for general debugging of audio, you also have the function audio_debug().
NOTE: This functionality is not available for the HTML5 target platform.
audio_sync_group_debug(group_index);
参数 | 描述 |
---|---|
group_index | The group index to debug, or -1 to switch off the debugging. |
N/A(无返回值)
if (debug_mode)
{
audio_sync_group_debug(sg);
}
else
{
audio_sync_group_debug(-1);
}
The above code will switch on or off the audio sync group debug overlay showing the sync group indexed in the variable "sg" depending on whether the game is run in debug mode or not.