elcoo Posted May 8, 2014 Share Posted May 8, 2014 Hi, I recently discovered that I'm not able to play more than 16 sounds at once. Using SoundDriver::GetCurrent()->GetMaxChannels() Returns 16. I can't imagine that OpenAL or my soundcard (Asus Xonar DX) is limited to 16 channels. 16 sounds at once is insufficient for any moderatly advanced game in my opinion. Every shooter that has a little bit of action going on is going to play far more than 16 sounds at once. Any tips what's wrong here? Is it a fault on my side, is it a bug? 2 Quote Link to comment Share on other sites More sharing options...
Haydenmango Posted May 8, 2014 Share Posted May 8, 2014 Interesting. I have been getting issues when I play to many sounds and was about to get around to asking a similar question. It became very apparent for me when I tried to give footsteps to all of my enemies. The sound starts to get delayed and doesn't sync back up until there is less sound playing. I wasn't sure why but if there is a limit of 16 channels that would explain it. Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
elcoo Posted May 8, 2014 Author Share Posted May 8, 2014 Yes, that's exactly the problem. Sounds that can not be played because of this limit seem to be queued and will be played when a channel gets free because another sound stopped playing. Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted May 8, 2014 Share Posted May 8, 2014 ..depending on hardware available, you could go more than that..bigger number of sources i have seen is 32 on test rigs i have had..but you should not completely rely on raw amount of available sources, and instead some sort of sound manager should be created so sound sources could be utilized more efficiently and according to scene/camera position, if limit is reached.. Quote Link to comment Share on other sites More sharing options...
elcoo Posted May 9, 2014 Author Share Posted May 9, 2014 Yes, a soundmanager might be useful, and is used in many modern games to sort sounds by their importance to the player. Some call that HDR Audio. Still 16 channels seems to small for me. Games like Red Orchestra use up to 128 channels, Battlefield 4 uses 60. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 9, 2014 Share Posted May 9, 2014 Leadwerks has a sound manager that allocates channels for the currently playing sounds. If a one-shot sound is played out of the listener's range, it will be skipped to conserve channels. I just checked the source code, and the number 16 was hard-coded because some Android devices did not return the real number of channels..they would return a larger number but crash if you used them. Now that Android is no longer a concern, I will happily fix that. On my little real-tek chip it supports 255 mono sources. So that's a bit better. 8 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
elcoo Posted May 10, 2014 Author Share Posted May 10, 2014 Thanks Josh, sounds great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.