Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Thu 24/11/2005 00:38:19

Title: Bug: Crash playing sound effects (FIXED)
Post by: Radiant on Thu 24/11/2005 00:38:19
Sometimes (don't you hate it when bug reports start with that word), when I play a number of WAVE sound effects in semi-rapid succession, AGS crashes. No error message other than "the game terminated unsuccessfully" or something like that; no line number, no logfile, nothing. Any suggestions what this might be?
Title: Re: Crash when playing sound effects
Post by: strazer on Thu 24/11/2005 00:44:26
What AGS version?
Is it always the same sound files?
Have you tried with other sound effects?
Does it also happen when the sound effects are MP3 or OGG?
Does changing the sound device in the game setup help?

Edit:
Oh, and what script commands do you use to play the files?
Title: Re: Crash when playing sound effects
Post by: Rui 'Trovatore' Pires on Thu 24/11/2005 00:48:13
QuoteDoes changing the sound device in the game setup help? 
If Radiant's talking about his MAGS game, then no, changing the sound device doesn't help.
Title: Re: Crash when playing sound effects
Post by: Radiant on Thu 24/11/2005 01:33:51
AGS version 2.70

It's a small group of sound files, I haven't tried it with any others (yet). I thought it were just a memory issue (I get plenty of those) until Rui had the same problem.

The sounds are PCM waves, 11KHz, 16 bit stereo, and are all rather short (about 0.6 seconds). I can send some if you think it might help.

The command used is PlaySound()
Title: Re: Crash when playing sound effects
Post by: Gilbert on Thu 24/11/2005 01:37:15
Hmmm can you try changing them to OGG/MP3 and see if that helps?
Title: Re: Crash when playing sound effects
Post by: Radiant on Thu 24/11/2005 01:44:58
Quote from: Gilbot V7000a on Thu 24/11/2005 01:37:15
Hmmm can you try changing them to OGG/MP3 and see if that helps?

Would you have a tool for that please?
Title: Re: Crash when playing sound effects
Post by: Gilbert on Thu 24/11/2005 02:18:30
Since I hadn't been doing such things lately, I can't recommend any programme, but you can for example search for "ogg converter" (maybe choose "free" in license also to filter out the sharewares) in download.com with plenty of results.
Maybe some other people can help.
Title: Re: Crash when playing sound effects
Post by: strazer on Thu 24/11/2005 02:43:58
I think Audacity (http://audacity.sourceforge.net/) can encode to both.
Title: Re: Crash when playing sound effects
Post by: Nikolas on Thu 24/11/2005 09:01:33
If I recall corectly, if converted to MP3 or OGG they won't play at all. I remember from another thread om the tech forum, where he had the opposite problem. He couldn't play short MP3s and sorted this out by making them WAV. By, Radiant, do try by all means.
Title: Re: Crash when playing sound effects
Post by: Pumaman on Thu 24/11/2005 10:31:00
Thanks for reporting this. It seems to be a bug in Allegro with stereo 8-bit wave files. I'll look into it further.
Title: Re: Crash when playing sound effects
Post by: Pumaman on Sat 03/12/2005 12:25:51
Can you confirm whether this is fixed with 2.71 final?
Title: Re: Crash when playing sound effects
Post by: strazer on Wed 28/12/2005 19:36:51
Quote from: Radiant on Sat 07/01/2006 21:48:14It seems to no longer occur on the latest full build of AGS. Since it was a heisenbug I can't fully guarantee it, but I've tested it long enough to be 99% certain.