mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
HostInterface: Fix mute not applying on startup
This commit is contained in:
parent
e07d3c9db2
commit
db9d637f92
|
@ -58,18 +58,17 @@ void HostInterface::CreateAudioStream()
|
|||
|
||||
m_audio_stream = CreateAudioStream(m_settings.audio_backend);
|
||||
|
||||
if (m_audio_stream && m_audio_stream->Reconfigure(AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, m_settings.audio_buffer_size,
|
||||
m_settings.audio_buffer_count))
|
||||
if (!m_audio_stream || !m_audio_stream->Reconfigure(AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, m_settings.audio_buffer_size,
|
||||
m_settings.audio_buffer_count))
|
||||
{
|
||||
m_audio_stream->SetOutputVolume(m_settings.audio_output_volume);
|
||||
return;
|
||||
ReportFormattedError("Failed to create or configure audio stream, falling back to null output.");
|
||||
m_audio_stream.reset();
|
||||
m_audio_stream = AudioStream::CreateNullAudioStream();
|
||||
m_audio_stream->Reconfigure(AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, m_settings.audio_buffer_size,
|
||||
m_settings.audio_buffer_count);
|
||||
}
|
||||
|
||||
ReportFormattedError("Failed to create or configure audio stream, falling back to null output.");
|
||||
m_audio_stream.reset();
|
||||
m_audio_stream = AudioStream::CreateNullAudioStream();
|
||||
m_audio_stream->Reconfigure(AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, m_settings.audio_buffer_size,
|
||||
m_settings.audio_buffer_count);
|
||||
m_audio_stream->SetOutputVolume(m_settings.audio_output_muted ? 0 : m_settings.audio_output_volume);
|
||||
}
|
||||
|
||||
bool HostInterface::BootSystem(const SystemBootParameters& parameters)
|
||||
|
|
Loading…
Reference in a new issue