From 564c953e9465855890149a2d1b4b51f1f644fd9b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 21 Sep 2019 16:47:33 -0700 Subject: Make the buffer frequency unsigned --- al/source.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'al/source.cpp') diff --git a/al/source.cpp b/al/source.cpp index f5550caf..7eda4fb6 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -267,8 +267,7 @@ ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, nanoseconds * } assert(BufferFmt != nullptr); - offset = static_cast(readPos) / ALdouble{FRACTIONONE} / - static_cast(BufferFmt->Frequency); + offset = static_cast(readPos) / ALdouble{FRACTIONONE} / BufferFmt->Frequency; } return offset; @@ -2784,7 +2783,7 @@ START_API_FUNC } ALbuffer *buffer{BufferList->mBuffer}; - voice->mFrequency = static_cast(buffer->Frequency); + voice->mFrequency = buffer->Frequency; voice->mFmtChannels = buffer->mFmtChannels; voice->mNumChannels = ChannelsFromFmt(buffer->mFmtChannels); voice->mSampleSize = BytesFromFmt(buffer->mFmtType); -- cgit v1.2.3