From a250b6a98639571eedcaaf858d014d22eb008999 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 13 Sep 2019 14:29:25 -0700 Subject: Return unsigned values from the FromDevFmt functions --- alc/backends/portaudio.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'alc/backends/portaudio.cpp') diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp index fcfd4b01..4704a806 100644 --- a/alc/backends/portaudio.cpp +++ b/alc/backends/portaudio.cpp @@ -114,7 +114,7 @@ int PortPlayback::writeCallback(const void*, void *outputBuffer, const PaStreamCallbackFlags) { lock(); - aluMixData(mDevice, outputBuffer, framesPerBuffer); + aluMixData(mDevice, outputBuffer, static_cast(framesPerBuffer)); unlock(); return 0; } @@ -182,7 +182,7 @@ retry_open: ALCboolean PortPlayback::reset() { const PaStreamInfo *streamInfo{Pa_GetStreamInfo(mStream)}; - mDevice->Frequency = streamInfo->sampleRate; + mDevice->Frequency = static_cast(streamInfo->sampleRate); mDevice->UpdateSize = mUpdateSize; if(mParams.sampleFormat == paInt8) @@ -293,7 +293,7 @@ ALCenum PortCapture::open(const ALCchar *name) ALuint samples{mDevice->BufferSize}; samples = maxu(samples, 100 * mDevice->Frequency / 1000); - ALsizei frame_size{mDevice->frameSizeFromFmt()}; + ALuint frame_size{mDevice->frameSizeFromFmt()}; mRing = CreateRingBuffer(samples, frame_size, false); if(!mRing) return ALC_INVALID_VALUE; @@ -326,7 +326,7 @@ ALCenum PortCapture::open(const ALCchar *name) ERR("%s samples not supported\n", DevFmtTypeString(mDevice->FmtType)); return ALC_INVALID_VALUE; } - mParams.channelCount = mDevice->channelsFromFmt(); + mParams.channelCount = static_cast(mDevice->channelsFromFmt()); PaError err{Pa_OpenStream(&mStream, &mParams, nullptr, mDevice->Frequency, paFramesPerBufferUnspecified, paNoFlag, &PortCapture::readCallbackC, this)}; @@ -361,7 +361,7 @@ void PortCapture::stop() ALCuint PortCapture::availableSamples() -{ return mRing->readSpace(); } +{ return static_cast(mRing->readSpace()); } ALCenum PortCapture::captureSamples(ALCvoid *buffer, ALCuint samples) { -- cgit v1.2.3