[Openal] Weird AL_INVALID_NAME error
openal at limebird.com
Wed Apr 7 01:37:50 PDT 2004
Grand, that really saved my day. Thank you very much for the help.
Sortof leads to two comments:
1. There's really a need for an updated documentation resource that
includes possible error sources. Is there any such project somewhere that
2. Wouldn't it be more appropriate to have another error there?
AL_INVALID_NAME is supposed to occur if I send an invalid name to an al
function - the error in this case was caused by a bug leading to that
alSourceQueueBuffers wasn't called at all. That is, i never gave an
invalid name as a parameter. Something like a new AL_INVALID_BUFFER or
such would maybe be more true to what actually happens.
Again, thanks a bunch.
On Wed, 7 Apr 2004, Michalis Kamburelis wrote:
> Mikael Hedberg wrote:
> > Is there any other thing which could be wrong to make alSourcePlay() to
> > set AL_INVALID_NAME?
> Maybe it's too obvious, but are you sure you associated a buffer with
> your source ? If you will do alSourcePlay on a source with no associated
> buffer alSourcePlay will raise AL_INVALID_NAME. It doesn't matter that
> the source is valid, the buffer is not valid.
> alSourcePlay does not raise AL_INVALID_NAME only when internal
> _alIsSource fails. alSourcePlayv also calls _alAddSourceToMixer that
> calls _alAllocMixSource that sets AL_INVALID_NAME if _alIsBuffer fails.
> If you are checking same nice asserts before alSourcePlay, I guess you
> should add just after
> assert(alIsSource(voices[i].alSource) == AL_TRUE);
> something like
> alGetSourcei(v, AL_BUFFER, &buf);
> assert(alIsBuffer(buf) == AL_TRUE);
> openal mailing list
> openal at opensource.creative.com
More information about the Openal