ignore penumbra member variable

This commit is contained in:
Atlante45 2014-11-04 16:44:39 +01:00
parent c7b8f7a792
commit fb33634171
3 changed files with 9 additions and 4 deletions

View file

@ -353,7 +353,7 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(AudioMixerClientData* l
}
}
if (!sourceIsSelf && _enableFilter) {
if (!sourceIsSelf && _enableFilter && !streamToAdd->ignorePenumbraFilter()) {
const float TWO_OVER_PI = 2.0f / PI;

View file

@ -45,7 +45,8 @@ InboundAudioStream::InboundAudioStream(int numFrameSamples, int numFramesCapacit
_currentJitterBufferFrames(0),
_timeGapStatsForStatsPacket(0, STATS_FOR_STATS_PACKET_WINDOW_SECONDS),
_repetitionWithFade(settings._repetitionWithFade),
_hasReverb(false)
_hasReverb(false),
_ignorePenumbra(false)
{
}

View file

@ -47,6 +47,7 @@ const bool DEFAULT_REPETITION_WITH_FADE = true;
// Audio Env bitset
const int HAS_REVERB_BIT = 0; // 1st bit
const int IGNORE_PENUMBRA = 1; // 2nd bit
class InboundAudioStream : public NodeData {
Q_OBJECT
@ -113,10 +114,8 @@ public:
bool lastPopSucceeded() const { return _lastPopSucceeded; };
const AudioRingBuffer::ConstIterator& getLastPopOutput() const { return _lastPopOutput; }
void setToStarved();
void setSettings(const Settings& settings);
void setMaxFramesOverDesired(int maxFramesOverDesired) { _maxFramesOverDesired = maxFramesOverDesired; }
@ -164,6 +163,8 @@ public:
void setReverb(float reverbTime, float wetLevel);
void clearReverb() { _hasReverb = false; }
bool ignorePenumbraFilter() { return _ignorePenumbra; }
public slots:
/// This function should be called every second for all the stats to function properly. If dynamic jitter buffers
/// is enabled, those stats are used to calculate _desiredJitterBufferFrames.
@ -257,6 +258,9 @@ protected:
bool _hasReverb;
float _reverbTime;
float _wetLevel;
// Ignore penumbra filter
bool _ignorePenumbra;
};
float calculateRepeatedFrameFadeFactor(int indexOfRepeat);