Chaos Project

Featured Projects => Advanced RPG Creator => Core Development => Topic started by: ForeverZer0 on May 12, 2011, 01:21:02 am

Title: Bug with Audio
Post by: ForeverZer0 on May 12, 2011, 01:21:02 am
I know this is not fully implemented yet, but just wanted to point it out sooner than later.
If the sound is played to quickly together, all audio will fail and not return.

I was scrolling up and down quickly through the save files, and I noticed the volume decrease drastically. I did it a few more times quickly, and the sound stopped altogether. I restarted a few times, and found that it would do it every time.

The log read:
[xal] unable to allocate audio source!


I know you (Blizz) are still working on this, so this entire post may be a waste of both our times. Sorry if it is!  :P
Title: Re: Bug with Audio
Post by: Blizzard on May 12, 2011, 06:42:07 am
That's not a bug, it's a limitation of OpenAL. It can only handle 16 different sounds simultaneously. 16 is actually just a minimum and you can specify more audio sources, but I don't know how systems with only 16 sources will react to trying to allocate more than 16 sources so we never used more than 16 in Cateia.

But you don't have to worry about that, the final version will use DirectSound on Win platforms, SDL on Unix platforms and CoreAudio on Mac platforms. Basically we will probably be able to use as many sounds simultaneously as the OS allows us.

EDIT: You can actually try it out if you want. Just change the build configuration to win32_DirectSound_Debug and try again. Make sure you turn of streaming (search for xal::STREAMED and change them into xal::FULL), because I haven't implemented streaming for DirectSound yet. I'm working on it today and it should be done either today or tomorrow.