[Scummvm-git-logs] scummvm master -> a27f322cd8e6ffe68e506a6ab364365c93edc62b

ccawley2011 noreply at scummvm.org
Wed Jun 5 11:32:30 UTC 2024


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bd124e2956 AUDIO: Clarify the return value of Mixer::getOutputBufSize()
a27f322cd8 DS: Report the buffer size to the mixer


Commit: bd124e2956568e88469529e70cf8a4f036cdffc2
    https://github.com/scummvm/scummvm/commit/bd124e2956568e88469529e70cf8a4f036cdffc2
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-05T12:32:25+01:00

Commit Message:
AUDIO: Clarify the return value of Mixer::getOutputBufSize()

Changed paths:
    audio/mixer.h


diff --git a/audio/mixer.h b/audio/mixer.h
index ad2c1683340..95e2e48a3b6 100644
--- a/audio/mixer.h
+++ b/audio/mixer.h
@@ -338,6 +338,10 @@ public:
 	/**
 	 * Return the output sample buffer size of the system.
 	 *
+	 * The return value is measured in frame units instead of bytes. It can be converted
+	 * to bytes by multiplying it with the sample size and the number of channels. For
+	 * example, for 16-bit stereo output it should be multiplied by 4.
+	 *
 	 * @return The number of samples processed at each audio callback.
 	 */
 	virtual uint getOutputBufSize() const = 0;


Commit: a27f322cd8e6ffe68e506a6ab364365c93edc62b
    https://github.com/scummvm/scummvm/commit/a27f322cd8e6ffe68e506a6ab364365c93edc62b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-06-05T12:32:25+01:00

Commit Message:
DS: Report the buffer size to the mixer

Changed paths:
    backends/mixer/maxmod/maxmod-mixer.cpp


diff --git a/backends/mixer/maxmod/maxmod-mixer.cpp b/backends/mixer/maxmod/maxmod-mixer.cpp
index 41deaefbaa3..e4050c8897a 100644
--- a/backends/mixer/maxmod/maxmod-mixer.cpp
+++ b/backends/mixer/maxmod/maxmod-mixer.cpp
@@ -56,7 +56,7 @@ mm_word on_stream_request( mm_word length, mm_addr dest, mm_stream_formats forma
 }
 
 void MaxModMixerManager::init() {
-	_mixer = new Audio::MixerImpl(_freq);
+	_mixer = new Audio::MixerImpl(_freq, _bufSize / 4);
 	assert(_mixer);
 
 	mm_ds_system sys;




More information about the Scummvm-git-logs mailing list