[Openal] alSourcei(.. Al_BUFFER, ...) illegal call
dpeacock at creativelabs.com
Tue Feb 19 11:06:22 PST 2008
alSourcei(Source, AL_BUFFER, Buffer) can generate AL_INVALID_OPERATION
under these circumstances: -
- Source is playing or paused
- Run out of hardware voices
It sounds like have done the right thing in the context attributes -
requested 3 stereos and 75 monos, and then checking to see what is actually
available (3 stereo and 23 mono). This means you should be able to
generate at maximum of 26 Sources.
Assuming the Source is stopped and this is a voice-count issue ... do you
always play the Stereo Buffers on the same 3 Sources? If not, the problem
could be that a Source still has a Stereo buffer attached to it and is
still consuming the resources even though it isn't playing. You can either
delete the Source, or attach a mono Buffer to it to free the "stereo"
resources. Alternatively you could reserve 3 Sources for Stereo Buffers
Creative Labs, Inc.
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
<xavier at nadeo.com
Sent by: openal at opensource.creative.com
openal-bounces at op cc
[Openal] alSourcei(.. Al_BUFFER,
...) illegal call
(using device "Generic Hardware on Audio SB Live! [A000]")
Sometimes, when doing
alSourcei(Source, AL_BUFFER, Buffer),
I get 0xa004 'Illegal call' error.
And I'm not sure how interpret/fix the error.
- I'm "sure" that Source and Buffer are valid.
- At the program start time, I create a pool of sources, and I try to
associate all of them at the same time with dummy buffers (a fixed
number of stereo buffers and the rest are mono) to make sure I don't
reach some chanel limitation
- when querrying Alc for this device, I get ALC_STEREO_SOURCES=1 and
ALC_MONO_SOURCES = 27.
The programs calls alcCreateContext() with ContextFlags including
ALC_STEREO_SOURCES=3 and ALC_MONO_SOURCES=75, and I get back 23 mono
sources and 3 stereo ones, that I'm actually able to allocate.
what could cause such an error?
should I discard the source from my pool when the error occurs?
Openal mailing list
Openal at opensource.creative.com
More information about the Openal