[Scummvm-git-logs] scummvm master -> 2048c9cc7810948f6dc913dd44e606efcab9bb2b

bluegr bluegr at gmail.com
Sat Nov 30 15:47:38 UTC 2019


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:
2048c9cc78 AUDIO: Remove unused parameter from the MixerImpl constructor


Commit: 2048c9cc7810948f6dc913dd44e606efcab9bb2b
    https://github.com/scummvm/scummvm/commit/2048c9cc7810948f6dc913dd44e606efcab9bb2b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2019-11-30T17:47:34+02:00

Commit Message:
AUDIO: Remove unused parameter from the MixerImpl constructor

Changed paths:
    audio/mixer.cpp
    audio/mixer_intern.h
    backends/mixer/nullmixer/nullsdl-mixer.cpp
    backends/mixer/sdl/sdl-mixer.cpp
    backends/platform/3ds/osystem-audio.cpp
    backends/platform/android/android.cpp
    backends/platform/dc/dcmain.cpp
    backends/platform/ds/arm9/source/osystem_ds.cpp
    backends/platform/ios7/ios7_osys_sound.cpp
    backends/platform/iphone/osys_sound.cpp
    backends/platform/n64/osys_n64_base.cpp
    backends/platform/null/null.cpp
    backends/platform/ps2/systemps2.cpp
    backends/platform/psp/osys_psp.cpp
    backends/platform/tizen/audio.cpp
    backends/platform/tizen/audio.h
    backends/platform/tizen/system.cpp
    backends/platform/wii/osystem_sfx.cpp


diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index 274f8e9..9eb3e67 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -23,7 +23,6 @@
 #include "gui/EventRecorder.h"
 
 #include "common/util.h"
-#include "common/system.h"
 #include "common/textconsole.h"
 
 #include "audio/mixer_intern.h"
@@ -173,8 +172,7 @@ private:
 #pragma mark --- Mixer ---
 #pragma mark -
 
-// TODO: parameter "system" is unused
-MixerImpl::MixerImpl(OSystem *system, uint sampleRate)
+MixerImpl::MixerImpl(uint sampleRate)
 	: _mutex(), _sampleRate(sampleRate), _mixerReady(false), _handleSeed(0), _soundTypeSettings() {
 
 	assert(sampleRate > 0);
diff --git a/audio/mixer_intern.h b/audio/mixer_intern.h
index a8b7981..9cb7fa0 100644
--- a/audio/mixer_intern.h
+++ b/audio/mixer_intern.h
@@ -73,7 +73,7 @@ private:
 
 public:
 
-	MixerImpl(OSystem *system, uint sampleRate);
+	MixerImpl(uint sampleRate);
 	~MixerImpl();
 
 	virtual bool isReady() const { return _mixerReady; }
diff --git a/backends/mixer/nullmixer/nullsdl-mixer.cpp b/backends/mixer/nullmixer/nullsdl-mixer.cpp
index 97b59bb..8f112e1 100644
--- a/backends/mixer/nullmixer/nullsdl-mixer.cpp
+++ b/backends/mixer/nullmixer/nullsdl-mixer.cpp
@@ -38,7 +38,7 @@ NullSdlMixerManager::~NullSdlMixerManager() {
 }
 
 void NullSdlMixerManager::init() {
-	_mixer = new Audio::MixerImpl(g_system, _outputRate);
+	_mixer = new Audio::MixerImpl(_outputRate);
 	assert(_mixer);
 	_mixer->setReady(true);
 }
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index 0af0748..2a46d87 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -81,7 +81,7 @@ void SdlMixerManager::init() {
 		warning("Could not open audio device: %s", SDL_GetError());
 
 		// The mixer is not marked as ready
-		_mixer = new Audio::MixerImpl(g_system, desired.freq);
+		_mixer = new Audio::MixerImpl(desired.freq);
 		return;
 	}
 
@@ -96,7 +96,7 @@ void SdlMixerManager::init() {
 			warning("Could not open audio device: %s", SDL_GetError());
 
 			// The mixer is not marked as ready
-			_mixer = new Audio::MixerImpl(g_system, desired.freq);
+			_mixer = new Audio::MixerImpl(desired.freq);
 			return;
 		}
 
@@ -118,7 +118,7 @@ void SdlMixerManager::init() {
 		error("SDL mixer output requires stereo output device");
 #endif
 
-	_mixer = new Audio::MixerImpl(g_system, _obtained.freq);
+	_mixer = new Audio::MixerImpl(_obtained.freq);
 	assert(_mixer);
 	_mixer->setReady(true);
 
diff --git a/backends/platform/3ds/osystem-audio.cpp b/backends/platform/3ds/osystem-audio.cpp
index 043aaf1..3434b53 100644
--- a/backends/platform/3ds/osystem-audio.cpp
+++ b/backends/platform/3ds/osystem-audio.cpp
@@ -75,7 +75,7 @@ static void audioThreadFunc(void *arg) {
 }
 
 void OSystem_3DS::initAudio() {
-	_mixer = new Audio::MixerImpl(this, 22050);
+	_mixer = new Audio::MixerImpl(22050);
 
 	hasAudio = R_SUCCEEDED(ndspInit());
 	_mixer->setReady(false);
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index e450c70..78657d3 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -347,7 +347,7 @@ void OSystem_Android::initBackend() {
 
 	gettimeofday(&_startTime, 0);
 
-	_mixer = new Audio::MixerImpl(this, _audio_sample_rate);
+	_mixer = new Audio::MixerImpl(_audio_sample_rate);
 	_mixer->setReady(true);
 
 	_timer_thread_exit = false;
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 31fd883..c74646c 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -58,7 +58,7 @@ void OSystem_Dreamcast::initBackend()
   _timerManager = new DefaultTimerManager();
 
   uint sampleRate = initSound();
-  _mixer = new Audio::MixerImpl(this, sampleRate);
+  _mixer = new Audio::MixerImpl(sampleRate);
   _mixer->setReady(true);
 
   _audiocdManager = new DCCDManager();
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index c9a1f08..a387f0a 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -130,7 +130,7 @@ void OSystem_DS::initBackend() {
 		DS::startSound(11025, 4096);
 	}
 
-	_mixer = new Audio::MixerImpl(this, DS::getSoundFrequency());
+	_mixer = new Audio::MixerImpl(DS::getSoundFrequency());
 	_mixer->setReady(true);
 
 	/* TODO/FIXME: The NDS should use a custom AudioCD manager instance!
diff --git a/backends/platform/ios7/ios7_osys_sound.cpp b/backends/platform/ios7/ios7_osys_sound.cpp
index 07e9458..fdbb1f2 100644
--- a/backends/platform/ios7/ios7_osys_sound.cpp
+++ b/backends/platform/ios7/ios7_osys_sound.cpp
@@ -46,7 +46,7 @@ void OSystem_iOS7::mixCallback(void *sys, byte *samples, int len) {
 }
 
 void OSystem_iOS7::setupMixer() {
-	_mixer = new Audio::MixerImpl(this, AUDIO_SAMPLE_RATE);
+	_mixer = new Audio::MixerImpl(AUDIO_SAMPLE_RATE);
 
 	s_soundCallback = mixCallback;
 	s_soundParam = this;
diff --git a/backends/platform/iphone/osys_sound.cpp b/backends/platform/iphone/osys_sound.cpp
index 34c1cbf..5334875 100644
--- a/backends/platform/iphone/osys_sound.cpp
+++ b/backends/platform/iphone/osys_sound.cpp
@@ -46,7 +46,7 @@ void OSystem_IPHONE::mixCallback(void *sys, byte *samples, int len) {
 }
 
 void OSystem_IPHONE::setupMixer() {
-	_mixer = new Audio::MixerImpl(this, AUDIO_SAMPLE_RATE);
+	_mixer = new Audio::MixerImpl(AUDIO_SAMPLE_RATE);
 
 	s_soundCallback = mixCallback;
 	s_soundParam = this;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 357bdf2..277cc1f 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -881,7 +881,7 @@ void OSystem_N64::setTimerCallback(TimerProc callback, int interval) {
 }
 
 void OSystem_N64::setupMixer(void) {
-	_mixer = new Audio::MixerImpl(this, DEFAULT_SOUND_SAMPLE_RATE);
+	_mixer = new Audio::MixerImpl(DEFAULT_SOUND_SAMPLE_RATE);
 	_mixer->setReady(false);
 
 	enableAudioPlayback();
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 2f34ae8..6261212 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -93,7 +93,7 @@ void OSystem_NULL::initBackend() {
 	_eventManager = new DefaultEventManager(this);
 	_savefileManager = new DefaultSaveFileManager();
 	_graphicsManager = new NullGraphicsManager();
-	_mixer = new Audio::MixerImpl(this, 22050);
+	_mixer = new Audio::MixerImpl(22050);
 
 	((Audio::MixerImpl *)_mixer)->setReady(false);
 
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 2a8f2d6..a9fc71c 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -378,7 +378,7 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) {
 void OSystem_PS2::init(void) {
 	sioprintf("Timer...\n");
 	_timerManager = new DefaultTimerManager();
-	_scummMixer = new Audio::MixerImpl(this, 48000);
+	_scummMixer = new Audio::MixerImpl(48000);
 	_scummMixer->setReady(true);
 
 	initTimer();
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index a658406..2febf91 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -412,7 +412,7 @@ void OSystem_PSP::setupMixer(void) {
 		return;
 	}
 	samplesPerSec = _audio.getFrequency();	// may have been changed by audio system
-	_mixer = new Audio::MixerImpl(this, samplesPerSec);
+	_mixer = new Audio::MixerImpl(samplesPerSec);
 	assert(_mixer);
 	_mixer->setReady(true);
 	_audio.unpause();
diff --git a/backends/platform/tizen/audio.cpp b/backends/platform/tizen/audio.cpp
index b2e061b..bedac2d 100644
--- a/backends/platform/tizen/audio.cpp
+++ b/backends/platform/tizen/audio.cpp
@@ -43,7 +43,7 @@ AudioThread::AudioThread() :
 	_muted(true) {
 }
 
-Audio::MixerImpl *AudioThread::Construct(OSystem *system) {
+Audio::MixerImpl *AudioThread::Construct() {
 	logEntered();
 
 	if (IsFailed(EventDrivenThread::Construct(DEFAULT_STACK_SIZE, THREAD_PRIORITY_HIGH))) {
@@ -51,7 +51,7 @@ Audio::MixerImpl *AudioThread::Construct(OSystem *system) {
 		return NULL;
 	}
 
-	_mixer = new Audio::MixerImpl(system, 44100);
+	_mixer = new Audio::MixerImpl(44100);
 	return _mixer;
 }
 
diff --git a/backends/platform/tizen/audio.h b/backends/platform/tizen/audio.h
index de4724e..db87d78 100644
--- a/backends/platform/tizen/audio.h
+++ b/backends/platform/tizen/audio.h
@@ -50,7 +50,7 @@ public:
 	AudioThread(void);
 	~AudioThread(void);
 
-	Audio::MixerImpl *Construct(OSystem *system);
+	Audio::MixerImpl *Construct();
 	bool isSilentMode();
 	void setMute(bool on);
 
diff --git a/backends/platform/tizen/system.cpp b/backends/platform/tizen/system.cpp
index 3eaa99e..23b0718 100644
--- a/backends/platform/tizen/system.cpp
+++ b/backends/platform/tizen/system.cpp
@@ -287,7 +287,7 @@ result TizenSystem::initModules() {
 		return E_OUT_OF_MEMORY;
 	}
 
-	_mixer = _audioThread->Construct(this);
+	_mixer = _audioThread->Construct();
 	if (!_mixer) {
 		return E_OUT_OF_MEMORY;
 	}
diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp
index 445bb2e..ea7dc9e 100644
--- a/backends/platform/wii/osystem_sfx.cpp
+++ b/backends/platform/wii/osystem_sfx.cpp
@@ -71,7 +71,7 @@ static void * sfx_thread_func(void *arg) {
 }
 
 void OSystem_Wii::initSfx() {
-	_mixer = new Audio::MixerImpl(this, 48000);
+	_mixer = new Audio::MixerImpl(48000);
 
 	sfx_thread_running = false;
 	sfx_thread_quit = false;




More information about the Scummvm-git-logs mailing list