From fe6a1244ed5a42c9c633efa5a6acb08f1bb10adb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 18 Mar 2020 22:46:32 -0700 Subject: [PATCH] Fix a couple compiler warnings --- app/streaming/audio/audio.cpp | 2 +- app/streaming/audio/renderers/sdlaud.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/streaming/audio/audio.cpp b/app/streaming/audio/audio.cpp index de07fac2..e3b360c1 100644 --- a/app/streaming/audio/audio.cpp +++ b/app/streaming/audio/audio.cpp @@ -237,7 +237,7 @@ void Session::arDecodeAndPlaySample(char* sampleData, int sampleLength) // Update desiredSize with the number of bytes actually populated by the decoding operation if (samplesDecoded > 0) { - SDL_assert(desiredSize >= sizeof(short) * samplesDecoded * s_ActiveSession->m_AudioConfig.channelCount); + SDL_assert(desiredSize >= (int)(sizeof(short) * samplesDecoded * s_ActiveSession->m_AudioConfig.channelCount)); desiredSize = sizeof(short) * samplesDecoded * s_ActiveSession->m_AudioConfig.channelCount; } else { diff --git a/app/streaming/audio/renderers/sdlaud.cpp b/app/streaming/audio/renderers/sdlaud.cpp index 419bade7..68507717 100644 --- a/app/streaming/audio/renderers/sdlaud.cpp +++ b/app/streaming/audio/renderers/sdlaud.cpp @@ -81,7 +81,7 @@ bool SdlAudioRenderer::prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* } SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, - "Desired audio buffer: %u samples (%lu bytes)", + "Desired audio buffer: %u samples (%zu bytes)", want.samples, want.samples * sizeof(short) * want.channels);