From 8670fca3dc83094cc7f58bd813cf6b5e93096bfb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 12 Jun 2019 22:51:09 -0700 Subject: Fix BS2B output --- Alc/alu.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Alc') diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 05a6970c..07b3ccd3 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -159,12 +159,17 @@ void ProcessUhj(ALCdevice *device, const ALsizei SamplesToDo) void ProcessBs2b(ALCdevice *device, const ALsizei SamplesToDo) { + /* First, decode the ambisonic mix to the "real" output. */ + BFormatDec *ambidec{device->AmbiDecoder.get()}; + ambidec->process(device->RealOut.Buffer, device->RealOut.NumChannels, device->Dry.Buffer, + SamplesToDo); + /* BS2B is stereo output only. */ const int lidx{device->RealOut.ChannelIndex[FrontLeft]}; const int ridx{device->RealOut.ChannelIndex[FrontRight]}; ASSUME(lidx >= 0 && ridx >= 0); - /* Apply binaural/crossfeed filter */ + /* Now apply the BS2B binaural/crossfeed filter. */ bs2b_cross_feed(device->Bs2b.get(), device->RealOut.Buffer[lidx].data(), device->RealOut.Buffer[ridx].data(), SamplesToDo); } -- cgit v1.2.3