Author Topic: Bug: AGS crashes when playing audio while skipping a cutscene  (Read 618 times)  Share 

tzachs

  • AGS Baker
  • Mittens Vassal
  • Parking Goat- games that goats like!
    • I can help with translating
    •  
  • tzachs worked on a game that was nominated for an AGS Award!
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:

Code: Adventure Game Studio
  1. AudioChannel* PlaySound(this AudioClip*,  AudioPriority priority,
  2.   RepeatStyle repeatStyle)
  3. {
  4.   if (Game.SkippingCutscene) return null;
  5.   return this.Play(priority, repeatStyle);
  6. }
  7.  

Declare it in the header:
Code: Adventure Game Studio
  1. import AudioChannel* PlaySound(this AudioClip*,  AudioPriority priority=eAudioPriorityHigh,
  2.   RepeatStyle repeatStyle=eOnce);
  3.  

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


Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Might be worth adding bugs to Bero's tracker since thats the only active repos currently.

tzachs

  • AGS Baker
  • Mittens Vassal
  • Parking Goat- games that goats like!
    • I can help with translating
    •  
  • tzachs worked on a game that was nominated for an AGS Award!
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?