diff options
author | Chris Robinson <[email protected]> | 2016-03-23 12:53:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-03-23 15:10:59 -0700 |
commit | 147274f165b5cf8f1f004567c777e0e274c9e228 (patch) | |
tree | 4cfa2bff040a95b6847604f010602425b259ae9c /Alc/ALu.c | |
parent | 0dc35784dbaa37857e988582f41482ef9b59d8a0 (diff) |
Up-sample first-order content when using a higher order HQ decoder
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1367,6 +1367,9 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) memset(device->VirtOut.Buffer[c], 0, SamplesToDo*sizeof(ALfloat)); for(c = 0;c < device->RealOut.NumChannels;c++) memset(device->RealOut.Buffer[c], 0, SamplesToDo*sizeof(ALfloat)); + if(device->Dry.Buffer != device->FOAOut.Buffer) + for(c = 0;c < device->FOAOut.NumChannels;c++) + memset(device->FOAOut.Buffer[c], 0, SamplesToDo*sizeof(ALfloat)); V0(device->Backend,lock)(); @@ -1467,6 +1470,11 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) } else if(device->AmbiDecoder) { + if(device->VirtOut.Buffer != device->FOAOut.Buffer) + bformatdec_upSample(device->AmbiDecoder, + device->VirtOut.Buffer, device->FOAOut.Buffer, + device->FOAOut.NumChannels, SamplesToDo + ); bformatdec_process(device->AmbiDecoder, device->RealOut.Buffer, device->RealOut.NumChannels, device->VirtOut.Buffer, SamplesToDo |