Jump to content

OpenAL limited to 16 channels?


elcoo
 Share

Recommended Posts

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?

  • Upvote 2
Link to comment
Share on other sites

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.

Check out my game Rogue Snowboarding- 

https://haydenmango.itch.io/roguesnowboarding

Link to comment
Share on other sites

..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..

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. smile.png

  • Upvote 8

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...