[Scummvm-git-logs] scummvm master -> 2c84382525af1afeb8b5528691ac866130cbaed3
lephilousophe
noreply at scummvm.org
Sun Dec 19 11:53:31 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2c84382525 ANDROID/AUDIO: Convert the output buffer size value given to the Mixer from bytes to frame size
Commit: 2c84382525af1afeb8b5528691ac866130cbaed3
https://github.com/scummvm/scummvm/commit/2c84382525af1afeb8b5528691ac866130cbaed3
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2021-12-19T12:53:27+01:00
Commit Message:
ANDROID/AUDIO: Convert the output buffer size value given to the Mixer from bytes to frame size
Changed paths:
backends/platform/android/android.cpp
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 249cc39052..37b6b7c0e1 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -464,7 +464,10 @@ void OSystem_Android::initBackend() {
gettimeofday(&_startTime, 0);
- _mixer = new Audio::MixerImpl(_audio_sample_rate, _audio_buffer_size);
+ // The division by four happens because the Mixer stores the size in frame units
+ // instead of bytes; this means that, since we have audio in stereo (2 channels)
+ // with a word size of 16 bit (2 bytes), we have to divide the effective size by 4.
+ _mixer = new Audio::MixerImpl(_audio_sample_rate, _audio_buffer_size / 4);
_mixer->setReady(true);
_timer_thread_exit = false;
More information about the Scummvm-git-logs
mailing list