From 5c11ec51bc0e246615874876c913371672a725a3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Aug 2009 15:32:26 +0000 Subject: - Destory AudioCDManager singleton after user quits a game, this saves a few bytes memory - Added FIXME to audiocd.h, concering why destroying the AudioCDManager can not quit CD playback right now svn-id: r43513 --- base/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'base/main.cpp') diff --git a/base/main.cpp b/base/main.cpp index d108512416..f9ebe7ae56 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -45,9 +45,12 @@ #include "common/file.h" #include "common/fs.h" #include "common/system.h" + #include "gui/GuiManager.h" #include "gui/message.h" +#include "sound/audiocd.h" + #include "backends/keymapper/keymapper.h" #if defined(_WIN32_WCE) @@ -416,6 +419,15 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { warning("Could not find any engine capable of running the selected game"); } + // We will destory the AudioCDManager singleton here to save some memory. + // This will not make the CD audio stop, one would have to enable this: + //AudioCD.stop(); + // but the engine is responsible for stopping CD playback anyway and + // this way we catch engines not doing it properly. For some more + // information about why AudioCDManager::destroy does not stop the CD + // playback read the FIXME in sound/audiocd.h + Audio::AudioCDManager::destroy(); + // reset the graphics to default setupGraphics(system); launcherDialog(); -- cgit v1.2.3 From 3ade77dfb06ba0d41f123306fcf529c7007351b9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Aug 2009 15:41:00 +0000 Subject: Typos. svn-id: r43515 --- base/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/main.cpp') diff --git a/base/main.cpp b/base/main.cpp index f9ebe7ae56..03db00a1d9 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -419,7 +419,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { warning("Could not find any engine capable of running the selected game"); } - // We will destory the AudioCDManager singleton here to save some memory. + // We will destroy the AudioCDManager singleton here to save some memory. // This will not make the CD audio stop, one would have to enable this: //AudioCD.stop(); // but the engine is responsible for stopping CD playback anyway and -- cgit v1.2.3