From aea118a23c0d06bd16544d2bb243dfe1faef1321 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Mon, 3 Feb 2025 20:46:24 -0500 Subject: [PATCH] Implement ChangeStreamFormat correctly This fixes a major sample rate bug when not at 44.1k in the auv2 --- src/wrapasauv2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wrapasauv2.cpp b/src/wrapasauv2.cpp index 390170b8..f01fa44f 100644 --- a/src/wrapasauv2.cpp +++ b/src/wrapasauv2.cpp @@ -1315,7 +1315,9 @@ OSStatus WrapAsAUV2::ChangeStreamFormat(AudioUnitScope inScope, AudioUnitElement const AudioStreamBasicDescription& inNewFormat) { // LOGINFO("ChangedStreamFormat called {} {}", inScope, inNewFormat.mChannelsPerFrame); - return noErr; + auto res = ausdk::AUBase::ChangeStreamFormat(inScope, inElement, inPrevFormat, inNewFormat); + + return res; } UInt32 WrapAsAUV2::SupportedNumChannels(const AUChannelInfo** outInfo)