diff options
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/coreaudio.cpp | 3 | ||||
-rw-r--r-- | alc/backends/opensl.cpp | 6 | ||||
-rw-r--r-- | alc/backends/wasapi.cpp | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index 99b06b7a..3ae9800c 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -374,7 +374,8 @@ OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*, audiobuf.list.mNumberBuffers = 2; audiobuf.list.mBuffers[0].mNumberChannels = mFormat.mChannelsPerFrame; audiobuf.list.mBuffers[0].mData = rec_vec.first.buf; - audiobuf.list.mBuffers[0].mDataByteSize = rec_vec.first.len * mFormat.mBytesPerFrame; + audiobuf.list.mBuffers[0].mDataByteSize = static_cast<UInt32>(rec_vec.first.len) * + mFormat.mBytesPerFrame; audiobuf.list.mBuffers[1].mNumberChannels = mFormat.mChannelsPerFrame; audiobuf.list.mBuffers[1].mData = rec_vec.second.buf; audiobuf.list.mBuffers[1].mDataByteSize = remaining * mFormat.mBytesPerFrame; diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp index 06d5cd40..3a2f455e 100644 --- a/alc/backends/opensl.cpp +++ b/alc/backends/opensl.cpp @@ -681,11 +681,11 @@ ALCenum OpenSLCapture::open(const ALCchar* name) { mFrameSize = mDevice->frameSizeFromFmt(); /* Ensure the total length is at least 100ms */ - ALsizei length{maxi(mDevice->BufferSize, mDevice->Frequency/10)}; + ALuint length{maxu(mDevice->BufferSize, mDevice->Frequency/10)}; /* Ensure the per-chunk length is at least 10ms, and no more than 50ms. */ - ALsizei update_len{clampi(mDevice->BufferSize/3, mDevice->Frequency/100, + ALuint update_len{clampu(mDevice->BufferSize/3, mDevice->Frequency/100, mDevice->Frequency/100*5)}; - ALsizei num_updates{(length+update_len-1) / update_len}; + ALuint num_updates{(length+update_len-1) / update_len}; try { mRing = CreateRingBuffer(num_updates, update_len*mFrameSize, false); diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index b762da76..0d04d5a7 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -429,6 +429,8 @@ constexpr char MessageStr[static_cast<unsigned int>(MsgType::Count)][20]{ /* Proxy interface used by the message handler. */ struct WasapiProxy { + virtual ~WasapiProxy() = default; + virtual HRESULT openProxy() = 0; virtual void closeProxy() = 0; |