Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
eb656507
Commit
eb656507
authored
Apr 03, 2017
by
Anne Heimes
Browse files
estimated corr factor selbst stezten, jetzt messen wie es aussieht
parent
fc01867c
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ITANetAudioStreamingServer.h
View file @
eb656507
...
...
@@ -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
...
...
src/ITANetAudioStreamingServer.cpp
View file @
eb656507
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment