mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[AFV] Verbose logging only for dev.builds
This commit is contained in:
committed by
Mat Sutcliffe
parent
0e4938ebc5
commit
b63e127b13
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user