More stuff, fix saved games

This commit is contained in:
elasota
2020-01-05 02:33:03 -05:00
parent a4b8db1065
commit aca18df74b
58 changed files with 1075 additions and 454 deletions

View File

@@ -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()