diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 0eed34f64..5a3f763d3 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -389,7 +389,7 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip throw FormatRuntimeError("Cannot get number of streams: %d\n", err); } - int n_streams = property_size / sizeof(AudioStreamID); + const size_t n_streams = property_size / sizeof(AudioStreamID); AudioStreamID streams[n_streams]; err = AudioObjectGetPropertyData(dev_id, &aopa, 0, NULL, &property_size, streams); if (err != noErr) { @@ -400,7 +400,7 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip int output_stream; AudioStreamBasicDescription output_format; - for (int i = 0; i < n_streams; i++) { + for (size_t i = 0; i < n_streams; i++) { UInt32 direction; AudioStreamID stream = streams[i]; aopa.mSelector = kAudioStreamPropertyDirection; @@ -423,14 +423,14 @@ osx_output_set_device_format(AudioDeviceID dev_id, const AudioStreamBasicDescrip if (err != noErr) throw FormatRuntimeError("Unable to get format size s for stream %d. Error = %s", streams[i], err); - int format_count = property_size / sizeof(AudioStreamRangedDescription); + const size_t format_count = property_size / sizeof(AudioStreamRangedDescription); AudioStreamRangedDescription format_list[format_count]; err = AudioObjectGetPropertyData(stream, &aopa, 0, NULL, &property_size, format_list); if (err != noErr) throw FormatRuntimeError("Unable to get available formats for stream %d. Error = %s", streams[i], err); float output_score = 0; - for (int j = 0; j < format_count; j++) { + for (size_t j = 0; j < format_count; j++) { AudioStreamBasicDescription format_desc = format_list[j].mFormat; std::string format_string;