diff options
author | Chris Robinson <[email protected]> | 2007-12-28 22:41:14 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-28 22:41:14 -0800 |
commit | 5f8e65e09941c9c5d48e2277a8b1be1e35f04a9a (patch) | |
tree | c0b71503e829f3cf2dcda7aaea081da4610a357c /OpenAL32/alSource.c | |
parent | d90b36cf1147b0b14068db55a7510ffb0d2d2641 (diff) |
Implement AL_EXT_FLOAT32
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)) { |