Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ITADataSources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
eb656507
Commit
eb656507
authored
8 years ago
by
Anne Heimes
Browse files
Options
Downloads
Patches
Plain Diff
estimated corr factor selbst stezten, jetzt messen wie es aussieht
parent
fc01867c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ITANetAudioStreamingServer.h
+5
-2
5 additions, 2 deletions
include/ITANetAudioStreamingServer.h
src/ITANetAudioStreamingServer.cpp
+12
-4
12 additions, 4 deletions
src/ITANetAudioStreamingServer.cpp
with
17 additions
and
6 deletions
include/ITANetAudioStreamingServer.h
+
5
−
2
View file @
eb656507
...
...
@@ -68,6 +68,9 @@ public:
int
GetNetStreamNumberOfChannels
(
)
const
;
double
GetNetStreamSampleRate
(
)
const
;
double
GetEstimatedCorrFactor
(
)
const
;
void
SetEstimatedCorrFactor
(
double
dcorrFactor
);
//! Enabled/disables export of loggers
void
SetDebuggingEnabled
(
bool
bEnabled
);
...
...
This diff is collapsed.
Click to expand it.
src/ITANetAudioStreamingServer.cpp
+
12
−
4
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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment