From f775f2537920ef0031926872c57332e99c048f63 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 Aug 2016 21:06:00 -0700 Subject: [PATCH] Modify NumUpdates for different sample rates instead of UpdateSize Not that this really changes anything since the CoreAudio backend doesn't honor the ALCdevice's buffer metrics, nor accurately report the device's actual metrics. But it clears up warnings from a non-multiple-of-four update size if the sample rate causes it to change. --- Alc/backends/coreaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c index cde3d505..24aeabd4 100644 --- a/Alc/backends/coreaudio.c +++ b/Alc/backends/coreaudio.c @@ -238,7 +238,7 @@ static ALCboolean ca_reset_playback(ALCdevice *device) if(device->Frequency != streamFormat.mSampleRate) { - device->UpdateSize = (ALuint)((ALuint64)device->UpdateSize * + device->NumUpdates = (ALuint)((ALuint64)device->NumUpdates * streamFormat.mSampleRate / device->Frequency); device->Frequency = streamFormat.mSampleRate; -- 2.11.4.GIT