diff options
Diffstat (limited to 'src/plugins/sound/oalsound/alsound.cpp')
-rw-r--r-- | src/plugins/sound/oalsound/alsound.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/plugins/sound/oalsound/alsound.cpp b/src/plugins/sound/oalsound/alsound.cpp index 0e15a40..19da66a 100644 --- a/src/plugins/sound/oalsound/alsound.cpp +++ b/src/plugins/sound/oalsound/alsound.cpp @@ -1,6 +1,6 @@ // * This file is part of the COLOBOT source code
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
+// * Copyright (C) 2012 Polish Portal of Colobot (PPC)
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ #define MIN(a, b) (a > b ? b : a)
-PLUGIN_INTERFACE(ALSound, CSoundInterface)
+PLUGIN_INTERFACE(ALSound)
char* ALSound::PluginName()
@@ -39,6 +39,19 @@ int ALSound::PluginVersion() }
+void ALSound::InstallPlugin()
+{
+ CInstanceManager::GetInstancePointer()->AddInstance(CLASS_SOUND, this);
+}
+
+
+void ALSound::UninstallPlugin()
+{
+ CInstanceManager::GetInstancePointer()->DeleteInstance(CLASS_SOUND, this);
+ CleanUp();
+}
+
+
ALSound::ALSound()
{
mEnabled = false;
@@ -58,11 +71,12 @@ void ALSound::CleanUp() {
if (mEnabled) {
GetLogger()->Info("Unloading files and closing device...\n");
- mEnabled = false;
+ StopAll();
for (auto item : mSounds)
delete item.second;
+ mEnabled = false;
alutExit();
}
}
|