diff options
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index f26d30ad..5ffc503c 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -607,6 +607,7 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) // Update AL_BUFFER parameter pSource->Buffer = buffer; + pSource->NeedsUpdate = AL_TRUE; } else alSetError(AL_INVALID_VALUE); @@ -1581,6 +1582,7 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL ALint iFrequency; ALint iFormat; ALboolean bBuffersValid = AL_TRUE; + ALboolean hadFormat = AL_FALSE; if (n == 0) return; @@ -1609,6 +1611,7 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL { iFrequency = ALBufferList->buffer->frequency; iFormat = ALBufferList->buffer->format; + hadFormat = AL_TRUE; break; } ALBufferList = ALBufferList->next; @@ -1693,6 +1696,10 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL // Update number of buffers in queue ALSource->BuffersInQueue += n; + // If no previous format, mark the source dirty now that it may + // have one + if(!hadFormat) + ALSource->NeedsUpdate = AL_TRUE; } } else |