summaryrefslogtreecommitdiff
path: root/drivers/coreaudio
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2019-10-24 17:34:18 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2019-10-24 20:37:56 +0300
commit7b64340eb008a11000518b9a15f15c673c7f2f25 (patch)
treedbc6b4fe838aadee91bbad208f9af153756e4d1d /drivers/coreaudio
parent79dae3a87e1c8a66897fc1816059f39c8f25cde4 (diff)
Fix compilation warnings in macOS build, enable `warnings=extra werror=yes` for macOS CI.
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index 3b06c47244..9081fccd3a 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -186,15 +186,15 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon,
for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) {
AudioBuffer *abuf = &ioData->mBuffers[i];
- int frames_left = inNumberFrames;
+ unsigned int frames_left = inNumberFrames;
int16_t *out = (int16_t *)abuf->mData;
while (frames_left) {
- int frames = MIN(frames_left, ad->buffer_frames);
+ unsigned int frames = MIN(frames_left, ad->buffer_frames);
ad->audio_server_process(frames, ad->samples_in.ptrw());
- for (int j = 0; j < frames * ad->channels; j++) {
+ for (unsigned int j = 0; j < frames * ad->channels; j++) {
out[j] = ad->samples_in[j] >> 16;
}
@@ -231,7 +231,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
OSStatus result = AudioUnitRender(ad->input_unit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, &bufferList);
if (result == noErr) {
- for (int i = 0; i < inNumberFrames * ad->capture_channels; i++) {
+ for (unsigned int i = 0; i < inNumberFrames * ad->capture_channels; i++) {
int32_t sample = ad->input_buf[i] << 16;
ad->capture_buffer_write(sample);