1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Correctly shutdown client media handlers

This commit is contained in:
Ivan Savenko
2023-11-13 15:24:14 +02:00
parent a6f37b7cd7
commit af0afb251e
3 changed files with 10 additions and 5 deletions

View File

@@ -23,8 +23,9 @@ protected:
bool initialized;
int volume; // from 0 (mute) to 100
public:
CAudioBase(): initialized(false), volume(0) {};
~CAudioBase() = default;
public:
virtual void init() = 0;
virtual void release() = 0;
@@ -32,7 +33,7 @@ public:
ui32 getVolume() const { return volume; };
};
class CSoundHandler: public CAudioBase
class CSoundHandler final : public CAudioBase
{
private:
//update volume on configuration change
@@ -124,7 +125,7 @@ public:
bool stop(int fade_ms=0);
};
class CMusicHandler: public CAudioBase
class CMusicHandler final: public CAudioBase
{
private:
//update volume on configuration change