From ef8d404b15e6d32506617a95aa3161fbe59ecdaf Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 30 Jan 2023 15:52:54 +1100 Subject: Continue ironing out i2s pipeline still at least one heap corruption issue, plus the i2s write method seems to block forever :/ --- src/codecs/mad.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/codecs') diff --git a/src/codecs/mad.cpp b/src/codecs/mad.cpp index a8c2fb11..dc75a892 100644 --- a/src/codecs/mad.cpp +++ b/src/codecs/mad.cpp @@ -43,7 +43,8 @@ auto MadMp3Decoder::GetOutputFormat() -> OutputFormat { return OutputFormat{ .num_channels = static_cast(synth_.pcm.channels), .bits_per_sample = 24, - .sample_rate_hz = synth_.pcm.samplerate, + .sample_rate_hz = + synth_.pcm.samplerate == 0 ? 44100 : synth_.pcm.samplerate, }; } -- cgit v1.2.3