[AFV] Verbose logging only for dev.builds

This commit is contained in:
Klaus Basan
2020-04-09 23:22:53 +02:00
committed by Mat Sutcliffe
parent 0e4938ebc5
commit b63e127b13
3 changed files with 12 additions and 10 deletions

View File

@@ -83,7 +83,7 @@ namespace BlackCore
if (m_inUse && !m_underflow && m_audioInput->getBufferedBytes() == 0)
{
CLogMessage(this).debug(u"[%1] [Delay++]") << m_callsign;
if (verbose()) { CLogMessage(this).debug(u"[%1] [Delay++]") << m_callsign; }
CallsignDelayCache::instance().underflow(m_callsign);
m_underflow = true;
}
@@ -110,7 +110,7 @@ namespace BlackCore
m_underflow = false;
int delayMs = CallsignDelayCache::instance().get(callsign);
CLogMessage(this).debug(u"[%1] [Delay %2]") << m_callsign << delayMs;
if (verbose()) { CLogMessage(this).debug(u"[%1] [Delay %2ms]") << m_callsign << delayMs; }
if (delayMs > 0)
{
int phaseDelayLength = (m_audioFormat.sampleRate() / 1000) * delayMs;
@@ -228,10 +228,6 @@ namespace BlackCore
setEffects();
}
bool CallsignSampleProvider::inUse() const
{
return m_inUse;
}
} // ns
} // ns
} // ns

View File

@@ -68,7 +68,7 @@ namespace BlackCore
//! @}
//! Callsign in use
bool inUse() const;
bool inUse() const { return m_inUse; }
//! Bypass effects
void setBypassEffects(bool bypassEffects);
@@ -81,9 +81,9 @@ namespace BlackCore
QAudioFormat m_audioFormat;
const double m_whiteNoiseGainMin = 0.17; //0.01;
const double m_hfWhiteNoiseGainMin = 0.6; //0.01;
const double m_acBusGainMin = 0.0028; //0.002;
const double m_whiteNoiseGainMin = 0.17; //0.01;
const double m_hfWhiteNoiseGainMin = 0.6; //0.01;
const double m_acBusGainMin = 0.0028; //0.002;
const int m_frameCount = 960;
const int m_idleTimeoutMs = 500;

View File

@@ -11,6 +11,7 @@
#ifndef BLACKSOUND_SAMPLEPROVIDER_H
#define BLACKSOUND_SAMPLEPROVIDER_H
#include "blackconfig/buildconfig.h"
#include "blacksound/blacksoundexport.h"
#include <QObject>
#include <QVector>
@@ -36,7 +37,12 @@ namespace BlackSound
//! Finished?
virtual bool isFinished() const { return false; }
protected:
//! Verbose logs?
bool static verbose() { return BlackConfig::CBuildConfig::isLocalDeveloperDebugBuild(); }
};
} // ns
} // ns