[Scummvm-git-logs] scummvm master -> 509ee9ad97135516f5f6a2e5f5412ce69e62f46a

dreammaster noreply at scummvm.org
Tue Jul 28 08:05:49 UTC 2026


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

Summary:
509ee9ad97 MADS: NEBULAR: Remove redundant Adlib data queue


Commit: 509ee9ad97135516f5f6a2e5f5412ce69e62f46a
    https://github.com/scummvm/scummvm/commit/509ee9ad97135516f5f6a2e5f5412ce69e62f46a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-07-28T18:04:35+10:00

Commit Message:
MADS: NEBULAR: Remove redundant Adlib data queue

Changed paths:
    engines/mads/nebular/sound/asound.cpp
    engines/mads/nebular/sound/asound.h


diff --git a/engines/mads/nebular/sound/asound.cpp b/engines/mads/nebular/sound/asound.cpp
index 3905a87d72b..d29c8c04206 100644
--- a/engines/mads/nebular/sound/asound.cpp
+++ b/engines/mads/nebular/sound/asound.cpp
@@ -240,23 +240,15 @@ void ASound::noise() {
 }
 
 void ASound::write(int reg, int val) {
-	_queue.push(RegisterValue(reg, val));
+	_opl->writeReg(reg, val);
 }
 
 int ASound::write2(int state, int reg, int val) {
-	// TODO: Original has a state parameter, not used when in Adlib mode?
 	_ports[reg] = val;
 	write(reg, val);
 	return state;
 }
 
-void ASound::flush() {
-	while (!_queue.empty()) {
-		RegisterValue v = _queue.pop();
-		_opl->writeReg(v._regNum, v._value);
-	}
-}
-
 void ASound::channelOn(int reg, int volume) {
 	write2(8, reg, (_ports[reg] & 0xC0) | (volume & 0x3F));
 }
@@ -590,9 +582,7 @@ void ASound::updateFNumber() {
 }
 
 void ASound::onTimer() {
-	Common::StackLock slock(_driverMutex);
 	poll();
-	flush();
 }
 
 void ASound::setVolume(int volume) {
diff --git a/engines/mads/nebular/sound/asound.h b/engines/mads/nebular/sound/asound.h
index 3763593cb78..ffd5ca24e2a 100644
--- a/engines/mads/nebular/sound/asound.h
+++ b/engines/mads/nebular/sound/asound.h
@@ -226,11 +226,6 @@ protected:
 	 */
 	int write2(int state, int reg, int val);
 
-	/**
-	 * Flush any pending Adlib register values to the OPL driver
-	 */
-	void flush();
-
 	/**
 	 * Turn a channel on
 	 */
@@ -307,7 +302,6 @@ public:
 	AdlibChannelData _channelData[11];
 	Common::Array<AdlibSample> _samples;
 	AdlibSample *_samplePtr;
-	Common::Queue<RegisterValue> _queue;
 	int _frameCounter;
 	bool _isDisabled;
 	int _noiseTicks1;       // remaining duration for noise voice 1 (byte_11F86)




More information about the Scummvm-git-logs mailing list