mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
windows/linux build break + addresses zappoman review comments
This commit is contained in:
parent
fd5e3d61dc
commit
bf6d34b6f3
4 changed files with 14 additions and 15 deletions
|
@ -270,10 +270,10 @@ void AudioMixer::addStreamToMixForListeningNodeWithStream(PositionalAudioStream*
|
|||
}
|
||||
}
|
||||
|
||||
if ( _enableFilter && shouldAttenuate ) {
|
||||
if (_enableFilter && shouldAttenuate) {
|
||||
|
||||
glm::vec3 relativePosition = streamToAdd->getPosition() - listeningNodeStream->getPosition();
|
||||
if ( relativePosition.z < 0 ) { // if the source is behind us
|
||||
if (relativePosition.z < 0) { // if the source is behind us
|
||||
|
||||
AudioFilterPEQ1s& penumbraFilter = streamToAdd->getFilter();
|
||||
|
||||
|
@ -297,13 +297,13 @@ void AudioMixer::addStreamToMixForListeningNodeWithStream(PositionalAudioStream*
|
|||
penumbraFilterFrequency = 2000.0f;
|
||||
penumbraFilterSlope = 1.0f; // gentle slope
|
||||
|
||||
// printf("gain=%f,angle=%f\n",penumbraFilterGain,headPenumbraAngle);
|
||||
|
||||
qDebug() << "penumbra gain=" << penumbraFilterGain << ", penumbraAngle=" << normalizedHeadPenumbraAngle;
|
||||
|
||||
// set the gain on both filter channels
|
||||
penumbraFilter.setParameters(0,0,SAMPLE_RATE,penumbraFilterFrequency,penumbraFilterGain,penumbraFilterSlope);
|
||||
penumbraFilter.setParameters(0,1,SAMPLE_RATE,penumbraFilterFrequency,penumbraFilterGain,penumbraFilterSlope);
|
||||
penumbraFilter.setParameters(0, 0, SAMPLE_RATE, penumbraFilterFrequency, penumbraFilterGain, penumbraFilterSlope);
|
||||
penumbraFilter.setParameters(0, 1, SAMPLE_RATE, penumbraFilterFrequency, penumbraFilterGain, penumbraFilterSlope);
|
||||
|
||||
penumbraFilter.render( _clientSamples, _clientSamples, NETWORK_BUFFER_LENGTH_SAMPLES_STEREO / 2);
|
||||
penumbraFilter.render(_clientSamples, _clientSamples, NETWORK_BUFFER_LENGTH_SAMPLES_STEREO / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef hifi_AudioFilter_h
|
||||
#define hifi_AudioFilter_h
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Implements a standard biquad filter in "Direct Form 1"
|
||||
// Reference http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
|
||||
//
|
||||
|
@ -91,7 +91,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Implements common base class interface for all Audio Filter Objects
|
||||
//
|
||||
template< class T >
|
||||
|
@ -152,7 +152,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Implements a low-shelf filter using a biquad
|
||||
//
|
||||
class AudioFilterLSF :
|
||||
|
@ -168,7 +168,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Implements a hi-shelf filter using a biquad
|
||||
//
|
||||
class AudioFilterHSF :
|
||||
|
@ -184,7 +184,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Implements a single-band parametric EQ using a biquad "peaking EQ" configuration
|
||||
//
|
||||
class AudioFilterPEQ :
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
//
|
||||
|
||||
#include <math.h>
|
||||
#include <vector.h>
|
||||
#include <SharedUtil.h>
|
||||
#include "AudioRingBuffer.h"
|
||||
#include "AudioFilter.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef hifi_AudioFilterBank_h
|
||||
#define hifi_AudioFilterBank_h
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Helper/convenience class that implements a bank of Filter objects
|
||||
//
|
||||
template< typename T, const int N, const int C >
|
||||
|
@ -150,7 +150,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Specializations of AudioFilterBank
|
||||
//
|
||||
typedef AudioFilterBank< AudioFilterLSF, 1, 1> AudioFilterLSF1m; // mono bank with one band of LSF
|
||||
|
|
Loading…
Reference in a new issue