aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/portaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-13 14:29:25 -0700
committerChris Robinson <[email protected]>2019-09-13 14:29:25 -0700
commita250b6a98639571eedcaaf858d014d22eb008999 (patch)
tree66b20aa2015bab606dcb19381efc39edd7adbdc2 /alc/backends/portaudio.cpp
parentfcd3bed0c0923ca2eff463e0e6cffc60e00f4a7d (diff)
Return unsigned values from the FromDevFmt functions
Diffstat (limited to 'alc/backends/portaudio.cpp')
-rw-r--r--alc/backends/portaudio.cpp10
1 files changed, 5 insertions, 5 deletions
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<ALuint>(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<ALuint>(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<int>(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<ALCuint>(mRing->readSpace()); }
ALCenum PortCapture::captureSamples(ALCvoid *buffer, ALCuint samples)
{