Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: tzachs on Sun 01/01/2012 21:24:51

Title: Bug: AGS crashes when playing audio while skipping a cutscene
Post by: tzachs on Sun 01/01/2012 21:24:51
I've encountered a bug with the new audio system.
If the user is skipping a cutscene which plays a sound, it can crash AGS (it has like 50% chance to crash).
If you use cutscenes, and the new audio system, you can workaround it by creating a workaround function in the global script:


AudioChannel* PlaySound(this AudioClip*,  AudioPriority priority,
  RepeatStyle repeatStyle)
{
  if (Game.SkippingCutscene) return null;
  return this.Play(priority, repeatStyle);
}


Declare it in the header:

import AudioChannel* PlaySound(this AudioClip*,  AudioPriority priority=eAudioPriorityHigh,
  RepeatStyle repeatStyle=eOnce);


And then replace all usages of the kind aMyAudio.Play, with aMyAudio.PlaySound.

Title: Re: Bug: AGS crashes when playing audio while skipping a cutscene
Post by: Calin Leafshade on Sun 01/01/2012 22:55:36
Might be worth adding bugs to Bero's tracker since thats the only active repos currently.
Title: Re: Bug: AGS crashes when playing audio while skipping a cutscene
Post by: tzachs on Fri 06/01/2012 13:16:59
I tried to search but failed miserably. The one tracker that I did see has bugs up until 2009...
Where is that magical tracker you're talking about?