[Openal] Weird AL_INVALID_NAME error
Mikael Hedberg
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
I've missed?
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.
Regards,
/Mikael Hedberg
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);
>
> Michalis.
> _______________________________________________
> openal mailing list
> openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
More information about the Openal
mailing list