Thread: OpenAL sources limit

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    10

    OpenAL sources limit

    Hello!
    My computer game uses OpenAL. I have recently encountered a problem: I can not generate as many sources as I want. It gives me this error:
    Code:
    There are not enough non-memory resources to create all the requested sources, or the array pointer is not valid.
    I don't actually understand what they mean by "non-memory resources". What does the count of possible sources depend on? How can I detect the possible count of sources? Some computers seem to allow much more sources.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Normally you can count on at least 20 sources. Depending on the sound card you may actually get up to 32 or more. Check the OpenAL docs for more information.

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    10
    Only 32? Do I understand something wrong? My computer is not the newest machine at all and I get at least 200.

    At the moment I have used a separate source for every character in my game. There are sometimes quite many needed in the current case. Actually not as many as 200, but still... Should I search for a more effective way to do it?

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    200? Wow. I definitely do not get 200 sources on my Audigy 2. The only way to bypass the source issue is to mix your own data and place it all into one or more sources. You can do this by additive mixing your samples and then playing the final mixed result on a sound source. In order to get low level access to correctly mix the sounds you can consult the OAL docs or you can use the Windows multimedia API. I don't remember if OAL allows you to manually mix your samples.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenAL channels
    By VirtualAce in forum Game Programming
    Replies: 1
    Last Post: 08-25-2009, 09:44 PM
  2. OpenAL issues
    By Slyde in forum Game Programming
    Replies: 2
    Last Post: 03-20-2004, 09:33 AM
  3. Replies: 3
    Last Post: 01-08-2004, 09:43 PM
  4. Heap limit error???
    By sunburnbyRA in forum C++ Programming
    Replies: 6
    Last Post: 04-10-2003, 03:12 PM
  5. hi need help with credit limit program
    By vaio256 in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2003, 12:23 AM