Commit eb656507 authored by Anne Heimes's avatar Anne Heimes

estimated corr factor selbst stezten, jetzt messen wie es aussieht

parent fc01867c
......@@ -65,8 +65,11 @@ public:
void SetInputStream( ITADatasource* pInStream );
int GetNetStreamBlocklength() const;
int GetNetStreamNumberOfChannels() const;
double GetNetStreamSampleRate() const;
int GetNetStreamNumberOfChannels( ) const;
double GetNetStreamSampleRate( ) const;
double GetEstimatedCorrFactor( ) const;
void SetEstimatedCorrFactor( double dcorrFactor );
//! Enabled/disables export of loggers
......
......@@ -218,11 +218,7 @@ bool CITANetAudioStreamingServer::LoopBody()
{
case CITANetAudioProtocol::NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES:
{
int iOldEstimatedRingBufferFreeSamples = m_iEstimatedClientRingBufferFreeSamples;
m_iEstimatedClientRingBufferFreeSamples = m_pMessage->ReadInt();
double dEstimatedDiffSamples = (dNow - m_dLastTimeStamp) * 44100;
double dRealDiffSamples = m_iEstimatedClientRingBufferFreeSamples - iOldEstimatedRingBufferFreeSamples;
m_dEstimatedCorrFactor = dRealDiffSamples / dEstimatedDiffSamples;
m_dLastTimeStamp = dNow;
break;
}
......@@ -353,6 +349,18 @@ int CITANetAudioStreamingServer::GetNetworkPort() const
return m_pNetAudioServer->GetNetworkPort();
}
double CITANetAudioStreamingServer::GetEstimatedCorrFactor( ) const
{
return m_dEstimatedCorrFactor;
}
void CITANetAudioStreamingServer::SetEstimatedCorrFactor( double dCorrFactor )
{
m_dEstimatedCorrFactor = dCorrFactor;
}
void CITANetAudioStreamingServer::Stop()
{
m_pNetAudioServer->Stop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment