[Openal] Problem creating Pool of sources on windows system
Adam D. Moss
adam at gimp.org
Mon Feb 14 06:55:39 PST 2005
Nigel Fooks wrote:
> I have a sound manager designed to maintain a pool of sources and when
> it's initialized it has a loop which
> keeps adding sources until an error is returned.
> The problem is that on some systems with an older driver it will keep
> adding unlimited sources and eventually
> reboot the system.
The maximum number of sources is not specified to be reasonably
finite, so this just isn't the right approach.
> I have it limited to 64 sources to correct the
> problem, but is there another way of doing it
> that will work better.
An app-defined upper-cap is indeed the best approach. The
original goal of sources was that they are a cheap resource and
you allocate as many as you need (that is to say, maybe
dozens, or hundreds, or thousands, but not an indefinite
amount), so an unbounded source-limit probing loop is going
to have problems. A real-life cap of ~32-64 sources is an
artifact of some particular (popular) AL implementations...
I think this is something that may be revised in some way
in the 1.1 spec.
Adam D. Moss - adam at gimp.org
More information about the Openal