1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

code review + pause handling

This commit is contained in:
Laserlicht
2024-10-30 00:35:50 +01:00
parent a68522b370
commit bb73a35412
7 changed files with 54 additions and 7 deletions

View File

@@ -240,6 +240,18 @@ void CSoundHandler::stopSound(int handler)
Mix_HaltChannel(handler);
}
void CSoundHandler::pauseSound(int handler)
{
if(isInitialized() && handler != -1)
Mix_Pause(handler);
}
void CSoundHandler::resumeSound(int handler)
{
if(isInitialized() && handler != -1)
Mix_Resume(handler);
}
ui32 CSoundHandler::getVolume() const
{
return volume;