Skip to content
Snippets Groups Projects
Commit eb656507 authored by Anne Heimes's avatar Anne Heimes
Browse files

estimated corr factor selbst stezten, jetzt messen wie es aussieht

parent fc01867c
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,9 @@ public: ...@@ -68,6 +68,9 @@ public:
int GetNetStreamNumberOfChannels( ) const; int GetNetStreamNumberOfChannels( ) const;
double GetNetStreamSampleRate( ) const; double GetNetStreamSampleRate( ) const;
double GetEstimatedCorrFactor( ) const;
void SetEstimatedCorrFactor( double dcorrFactor );
//! Enabled/disables export of loggers //! Enabled/disables export of loggers
void SetDebuggingEnabled( bool bEnabled ); void SetDebuggingEnabled( bool bEnabled );
......
...@@ -218,11 +218,7 @@ bool CITANetAudioStreamingServer::LoopBody() ...@@ -218,11 +218,7 @@ bool CITANetAudioStreamingServer::LoopBody()
{ {
case CITANetAudioProtocol::NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES: case CITANetAudioProtocol::NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES:
{ {
int iOldEstimatedRingBufferFreeSamples = m_iEstimatedClientRingBufferFreeSamples;
m_iEstimatedClientRingBufferFreeSamples = m_pMessage->ReadInt(); m_iEstimatedClientRingBufferFreeSamples = m_pMessage->ReadInt();
double dEstimatedDiffSamples = (dNow - m_dLastTimeStamp) * 44100;
double dRealDiffSamples = m_iEstimatedClientRingBufferFreeSamples - iOldEstimatedRingBufferFreeSamples;
m_dEstimatedCorrFactor = dRealDiffSamples / dEstimatedDiffSamples;
m_dLastTimeStamp = dNow; m_dLastTimeStamp = dNow;
break; break;
} }
...@@ -353,6 +349,18 @@ int CITANetAudioStreamingServer::GetNetworkPort() const ...@@ -353,6 +349,18 @@ int CITANetAudioStreamingServer::GetNetworkPort() const
return m_pNetAudioServer->GetNetworkPort(); return m_pNetAudioServer->GetNetworkPort();
} }
double CITANetAudioStreamingServer::GetEstimatedCorrFactor( ) const
{
return m_dEstimatedCorrFactor;
}
void CITANetAudioStreamingServer::SetEstimatedCorrFactor( double dCorrFactor )
{
m_dEstimatedCorrFactor = dCorrFactor;
}
void CITANetAudioStreamingServer::Stop() void CITANetAudioStreamingServer::Stop()
{ {
m_pNetAudioServer->Stop(); m_pNetAudioServer->Stop();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment