diff options
author | Chris Robinson <[email protected]> | 2009-10-25 05:03:22 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-25 05:03:22 -0700 |
commit | b0a82aa420c4bbeb465a0ee0300517f25b2ca6af (patch) | |
tree | 28da8e4fdfbbe73eba691583d91ec9674957640d /OpenAL32/alSource.c | |
parent | c003d6032de251ed58874fc712714e4725bbde9a (diff) |
Store the buffer format and frequency in the source when updated
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index b606d9fd..85b9c966 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -535,6 +535,9 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) // Source is now in STATIC mode pSource->lSourceType = AL_STATIC; + pSource->Format = buffer->format; + pSource->Frequency = buffer->frequency; + // Add the selected buffer to the queue pALBufferListItem = malloc(sizeof(ALbufferlistitem)); pALBufferListItem->buffer = buffer; @@ -1586,6 +1589,9 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL // Change Source Type ALSource->lSourceType = AL_STREAMING; + ALSource->Format = iFormat; + ALSource->Frequency = iFrequency; + if(buffers[0]) buffer = (ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[0]); |