Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 895495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:34:02+00:00 2026-05-15T14:34:02+00:00

Is there an API that allows you to define the maximum number of OpenAL

  • 0

Is there an API that allows you to define the maximum number of OpenAL “sources” allowed by the underlying sound hardware?

Searching the internet, I found 2 recommendations :

  • keep generating OpenAL sources till you get an error. However, there is a note in FreeSL (OpenAL wrapper) stating that this is “very bad and may even crash the library”
  • assume you only have 16; why would anyone ever require more? (!)

The second recommendation is even adopted by FreeSL.

So, is there a common API to define the number of simultaneous “voices” supported?

Thank you for your time,

Bill

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:34:03+00:00Added an answer on May 15, 2026 at 2:34 pm

    update:

    I can’t find a way to determine what the maximum number of sources a device supports, but I think I’ve found how to determine the maximum a context supports(ALC_MONO_SOURCES). It would follow that a context supports the same number as its parent device.

    //error checking omitted for brevity
    ALCdevice* device = alcOpenDevice(NULL);
    ALCcontext* context = alcCreateContext(device,NULL);
    ALCint size;
    alcGetIntegerv( device, ALC_ATTRIBUTES_SIZE, 1, &size);
    std::vector<ALCint> attrs(size);
    alcGetIntegerv( device, ALC_ALL_ATTRIBUTES, size, &attrs[0] );
    for(size_t i=0; i<attrs.size(); ++i)
    {
       if( attrs[i] == ALC_MONO_SOURCES )
       {
          std::cout << "max mono sources: " << attrs[i+1] << std::endl;
       }
    }
    

    This returns 255 on Ubuntu 10.4 using the stock OpenAL driver.


    The long answer is well kinda…

    Software based OpenAL drivers generally allow an infinite number of sources. Well, not really infinite, eventually you’ll max out either the CPU or the RAM eventually.

    Most hardware based OpenAL drivers only support as many sources as the hardware has channels. Modernly that is at least 16, probably 32 or more but can be as much as 256. There are probably sound cards that support more but 256 is the largest I’ve ever looked at.

    On Windows DirectSound based drivers are arbitrarily limited to 31 (why not 32?) sources. DirectSound has been deprecated so I don’t know if this still applies to Vista and Windows 7.

    The iPhone supports 32 sources.

    I have seen one hardware based driver that was software backed. Meaning it would give each source a hardware channel until they ran out. Then it would mix some of the sounds in software before shipping it off the the hardware. This gives the best of both worlds, near infinite sources, while still using as much hardware acceleration as possible.

    In practice if you’re using a hardware based driver, just keep creating them until alGenSources fails. I have heard this doesn’t work on the iPhone. There a some software based OpenAL drivers that will crash before alGenSources fails.

    There really ought to be an API to check the max number of sources and number of sources that are hardware accelerated. Maybe there is in the extensions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any Android API that allows me to read the sound level of
Is there a service or api that allows wikipedia data regarding a string be
I was wondering if there is an API that allows for direct communication between
Is there any API or webservices that allows us to manage online Office web
Is there any class provided in the Java standard API that allows file structure
Are there Windows API functions that allows reading what the current password policy is?
Is there any API that allows to prints all the exception-related info (stack trace,
Is there any API that allows us to convert Semantic query to SQL query?
My desktop application should update my facebook status. Is there an API that allows
Under POSIX OS there is signal API that allows to send a signal to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.