diff options
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index a06c6060..7c022e6c 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1910,6 +1910,10 @@ static ALboolean GetSourceOffset(ALsource *pSource, ALenum eName, ALfloat *pflOf { *pflOffset = (ALfloat)(lBytesPlayed >> 1); } + else if (aluBytesFromFormat(eOriginalFormat) == 4) + { + *pflOffset = (ALfloat)(lBytesPlayed << 1); + } else if ((eOriginalFormat == AL_FORMAT_MONO_IMA4) || (eOriginalFormat == AL_FORMAT_STEREO_IMA4)) { @@ -2061,6 +2065,11 @@ static ALint GetByteOffset(ALsource *pSource) lByteOffset = pSource->lOffset * 2; lByteOffset -= (lByteOffset % (lChannels * 2)); } + else if (aluBytesFromFormat(pBuffer->eOriginalFormat) == 4) + { + lByteOffset = pSource->lOffset / 2; + lByteOffset -= (lByteOffset % (lChannels * 2)); + } else if ((pBuffer->eOriginalFormat == AL_FORMAT_MONO_IMA4) || (pBuffer->eOriginalFormat == AL_FORMAT_STEREO_IMA4)) { |