From 66caaf610365d24b6fdccdcfef1c6ef0b364076c Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 29 Jul 2022 22:39:38 +1000 Subject: [PATCH] AudioStream: Fix null output --- src/util/audio_stream.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/audio_stream.cpp b/src/util/audio_stream.cpp index 12ed857c4..67bac59d4 100644 --- a/src/util/audio_stream.cpp +++ b/src/util/audio_stream.cpp @@ -39,7 +39,9 @@ AudioStream::~AudioStream() std::unique_ptr AudioStream::CreateNullStream(u32 sample_rate, u32 channels, u32 buffer_ms) { - return std::unique_ptr(new AudioStream(sample_rate, channels, buffer_ms, AudioStretchMode::Off)); + std::unique_ptr stream(new AudioStream(sample_rate, channels, buffer_ms, AudioStretchMode::Off)); + stream->BaseInitialize(); + return stream; } u32 AudioStream::GetAlignedBufferSize(u32 size)