summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-29 19:36:33 -0800
committerChris Robinson <[email protected]>2010-11-29 19:36:33 -0800
commit693ab4d8bc34cdc5a394eca45b2648f21613c917 (patch)
tree4e712994c37a0df3296bef44f267ace92d6569d4 /OpenAL32
parente4869b447c7594abc63a3b870e3d5ee6570dc23f (diff)
Fix source offset calculations
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alSource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 8abd8747..1f0594b2 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2018,13 +2018,13 @@ static ALint GetByteOffset(ALsource *Source)
break;
case AL_SAMPLE_OFFSET:
- ByteOffset = Source->lOffset * BytesFromFmt(Buffer->FmtType);
+ ByteOffset = Source->lOffset * FrameSizeFromFmt(Buffer->FmtType, Buffer->FmtChannels);
break;
case AL_SEC_OFFSET:
// Note - lOffset is internally stored as Milliseconds
ByteOffset = (ALint)(Source->lOffset / 1000.0 * Buffer->Frequency);
- ByteOffset *= BytesFromFmt(Buffer->FmtType);
+ ByteOffset *= FrameSizeFromFmt(Buffer->FmtType, Buffer->FmtChannels);
break;
}
// Clear Offset