aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-24 19:02:49 -0800
committerChris Robinson <[email protected]>2019-02-24 19:02:49 -0800
commitd6fb4d5f520e433410eab8fcd7beadabd563ece6 (patch)
treee6b062bd79954429e05091d4c2add5f7af05a83c /Alc/alu.cpp
parentd2664e2192fb5ac5af73079d9a6f05da11c2a06e (diff)
Make sure the voice's direct buffer is always set
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r--Alc/alu.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index 6512de78..25a55982 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -586,9 +586,10 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
);
voice->Flags &= ~(VOICE_HAS_HRTF | VOICE_HAS_NFC);
- if(isbformat)
+ if(isbformat) /* Special handling for B-Format sources. */
{
- /* Special handling for B-Format sources. */
+ voice->Direct.Buffer = Device->Dry.Buffer;
+ voice->Direct.Channels = Device->Dry.NumChannels;
if(Distance > std::numeric_limits<float>::epsilon())
{
@@ -615,9 +616,6 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
voice->Flags |= VOICE_HAS_NFC;
}
- voice->Direct.Buffer = Device->Dry.Buffer;
- voice->Direct.Channels = Device->Dry.NumChannels;
-
/* A scalar of 1.5 for plain stereo results in +/-60 degrees being
* moved to +/-90 degrees for direct right and left speaker
* responses.
@@ -687,8 +685,6 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
{ 0.0f, -V[0]*zscale, V[1]*zscale, -V[2]*zscale } // FuMa Z
};
- voice->Direct.Buffer = Device->Dry.Buffer;
- voice->Direct.Channels = Device->Dry.NumChannels;
for(ALsizei c{0};c < num_channels;c++)
ComputePanGains(&Device->Dry, matrix[c], DryGain,
voice->Direct.Params[c].Gains.Target);
@@ -817,6 +813,8 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
else
{
/* Non-HRTF rendering. Use normal panning to the output. */
+ voice->Direct.Buffer = Device->Dry.Buffer;
+ voice->Direct.Channels = Device->Dry.NumChannels;
if(Distance > std::numeric_limits<float>::epsilon())
{