diff options
author | Chris Robinson <[email protected]> | 2019-06-12 22:51:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-12 22:51:09 -0700 |
commit | 8670fca3dc83094cc7f58bd813cf6b5e93096bfb (patch) | |
tree | 3d6cb885b6fbb18f79f0e61b3e6be5e23d9f08e3 /Alc | |
parent | a2ba230e057d76b73b221f8dc44de17253b843cf (diff) |
Fix BS2B output
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |