Split SetSoundStreamRunning into StartSoundStream and StopSoundStream

This commit is contained in:
Dr. Dystopia 2024-12-22 12:33:11 +01:00
parent 8cc18164ee
commit 6c5aed38b3
3 changed files with 11 additions and 5 deletions

View file

@ -180,7 +180,7 @@ void StartSoundStream(Core::System& system)
if (system.IsSoundStreamRunning())
return;
system.SetSoundStreamRunning(true);
system.StartSoundStream();
if (sound_stream->SetRunning(true))
return;
@ -198,7 +198,7 @@ void StopSoundStream(Core::System& system)
if (!system.IsSoundStreamRunning())
return;
system.SetSoundStreamRunning(false);
system.StopSoundStream();
if (sound_stream->SetRunning(false))
return;

View file

@ -128,9 +128,14 @@ bool System::IsSoundStreamRunning() const
return m_impl->m_sound_stream_running;
}
void System::SetSoundStreamRunning(bool running)
void System::StartSoundStream()
{
m_impl->m_sound_stream_running = running;
m_impl->m_sound_stream_running = true;
}
void System::StopSoundStream()
{
m_impl->m_sound_stream_running = false;
}
bool System::IsAudioDumpStarted() const

View file

@ -151,7 +151,8 @@ public:
SoundStream* GetSoundStream() const;
void SetSoundStream(std::unique_ptr<SoundStream> sound_stream);
bool IsSoundStreamRunning() const;
void SetSoundStreamRunning(bool running);
void StartSoundStream();
void StopSoundStream();
bool IsAudioDumpStarted() const;
void SetAudioDumpStarted(bool started);