mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=898291 erase azimuth/elevation history when reset()ing HRTFPanner r=ehsan
so that old cross-fade info does not distort new sound when a PannerNode finishes and restarts. --HG-- extra : transplant_source : I%A9%DAx%9F%AE%B8%88%90FN%3B%3E%FC%FE%827%CB%10%8C
This commit is contained in:
parent
44c05b6e2a
commit
8c4aae7b76
@ -47,9 +47,8 @@ HRTFPanner::HRTFPanner(float sampleRate, mozilla::TemporaryRef<HRTFDatabaseLoade
|
||||
, m_sampleRate(sampleRate)
|
||||
, m_crossfadeSelection(CrossfadeSelection1)
|
||||
, m_azimuthIndex1(UninitializedAzimuth)
|
||||
, m_elevation1(0)
|
||||
, m_azimuthIndex2(UninitializedAzimuth)
|
||||
, m_elevation2(0)
|
||||
// m_elevation1 and m_elevation2 are initialized in pan()
|
||||
, m_crossfadeX(0)
|
||||
, m_crossfadeIncr(0)
|
||||
, m_convolverL1(HRTFElevation::fftSizeForSampleRate(sampleRate))
|
||||
@ -77,6 +76,12 @@ HRTFPanner::~HRTFPanner()
|
||||
|
||||
void HRTFPanner::reset()
|
||||
{
|
||||
m_azimuthIndex1 = UninitializedAzimuth;
|
||||
m_azimuthIndex2 = UninitializedAzimuth;
|
||||
// m_elevation1 and m_elevation2 are initialized in pan()
|
||||
m_crossfadeSelection = CrossfadeSelection1;
|
||||
m_crossfadeX = 0.0f;
|
||||
m_crossfadeIncr = 0.0f;
|
||||
m_convolverL1.reset();
|
||||
m_convolverR1.reset();
|
||||
m_convolverL2.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user