mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-28 16:16:21 -04:00
libobs: Fix warnings about implicit integer downcasts in macOS code
This commit is contained in:
@@ -43,7 +43,7 @@ static inline bool fill_buffer(struct audio_monitor *monitor)
|
||||
circlebuf_pop_front(&monitor->new_data, buf->mAudioData,
|
||||
monitor->buffer_size);
|
||||
|
||||
buf->mAudioDataByteSize = monitor->buffer_size;
|
||||
buf->mAudioDataByteSize = (UInt32)monitor->buffer_size;
|
||||
|
||||
stat = AudioQueueEnqueueBuffer(monitor->queue, buf, 0, NULL);
|
||||
if (!success(stat, "AudioQueueEnqueueBuffer")) {
|
||||
@@ -225,7 +225,7 @@ static bool audio_monitor_init(struct audio_monitor *monitor,
|
||||
|
||||
for (size_t i = 0; i < 3; i++) {
|
||||
stat = AudioQueueAllocateBuffer(monitor->queue,
|
||||
monitor->buffer_size,
|
||||
(UInt32)monitor->buffer_size,
|
||||
&monitor->buffers[i]);
|
||||
if (!success(stat, "allocation of buffer")) {
|
||||
return false;
|
||||
|
||||
@@ -322,7 +322,7 @@ obs_key_t obs_key_from_virtual_key(int code)
|
||||
return OBS_KEY_META;
|
||||
for (size_t i = 0; i < OBS_KEY_LAST_VALUE; i++) {
|
||||
if (virtual_keys[i] == code) {
|
||||
return i;
|
||||
return (obs_key_t) i;
|
||||
}
|
||||
}
|
||||
return OBS_KEY_NONE;
|
||||
|
||||
@@ -190,7 +190,7 @@ os_cpu_usage_info_t *os_cpu_usage_info_start(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
info->core_count = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
info->core_count = (int) sysconf(_SC_NPROCESSORS_ONLN);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user