From 298fdb220d2fe13b2c12d842ad40f39d9cf70e51 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 24 Oct 2015 15:13:56 -0700 Subject: Fix usage of modf --- OpenAL32/alSource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alSource.c') diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 53e388e4..b8677539 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -3005,13 +3005,13 @@ static ALboolean GetSampleOffset(ALsource *Source, ALuint *offset, ALuint *frac) break; case AL_SAMPLE_OFFSET: - dbloff = modf(Source->Offset, &dblfrac); + dblfrac = modf(Source->Offset, &dbloff); *offset = (ALuint)mind(dbloff, UINT_MAX); *frac = (ALuint)mind(dblfrac*FRACTIONONE, FRACTIONONE-1.0); break; case AL_SEC_OFFSET: - dbloff = modf(Source->Offset*Buffer->Frequency, &dblfrac); + dblfrac = modf(Source->Offset*Buffer->Frequency, &dbloff); *offset = (ALuint)mind(dbloff, UINT_MAX); *frac = (ALuint)mind(dblfrac*FRACTIONONE, FRACTIONONE-1.0); break; -- cgit v1.2.3