mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
More stuff, fix saved games
This commit is contained in:
@@ -329,7 +329,11 @@ namespace PortabilityLayer
|
||||
static SoundSystemImpl *GetInstance();
|
||||
|
||||
private:
|
||||
SoundSystemImpl();
|
||||
|
||||
static SoundSystemImpl ms_instance;
|
||||
|
||||
uint8_t m_volume;
|
||||
};
|
||||
|
||||
AudioChannel *SoundSystemImpl::CreateChannel()
|
||||
@@ -367,16 +371,16 @@ namespace PortabilityLayer
|
||||
return new (storage) PortabilityLayer::AudioChannelImpl(audioChannel, threadEvent, mutex);
|
||||
}
|
||||
|
||||
|
||||
void SoundSystemImpl::SetVolume(uint8_t vol)
|
||||
{
|
||||
PL_NotYetImplemented_TODO("Volume");
|
||||
PortabilityLayer::HostAudioDriver::GetInstance()->SetMasterVolume(vol, 255);
|
||||
m_volume = vol;
|
||||
}
|
||||
|
||||
uint8_t SoundSystemImpl::GetVolume() const
|
||||
{
|
||||
PL_NotYetImplemented_TODO("Volume");
|
||||
return 255;
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
SoundSystemImpl *SoundSystemImpl::GetInstance()
|
||||
@@ -384,6 +388,11 @@ namespace PortabilityLayer
|
||||
return &ms_instance;
|
||||
}
|
||||
|
||||
SoundSystemImpl::SoundSystemImpl()
|
||||
: m_volume(255)
|
||||
{
|
||||
}
|
||||
|
||||
SoundSystemImpl SoundSystemImpl::ms_instance;
|
||||
|
||||
SoundSystem *SoundSystem::GetInstance()
|
||||
|
||||
Reference in New Issue
Block a user