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
7468e80f
Commit
7468e80f
authored
8 years ago
by
Anne Heimes
Browse files
Options
Downloads
Plain Diff
Merge branch 'ba_2016_heimes' of
https://git.rwth-aachen.de/ita/ITADataSources
into ba_2016_heimes
parents
ed170e0f
fbe6a4d5
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ITANetAudioStreamingClient.cpp
+1
-1
1 addition, 1 deletion
src/ITANetAudioStreamingClient.cpp
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
+15
-13
15 additions, 13 deletions
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
with
16 additions
and
14 deletions
src/ITANetAudioStreamingClient.cpp
+
1
−
1
View file @
7468e80f
...
@@ -228,7 +228,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB
...
@@ -228,7 +228,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB
{
{
m_sClientLoggerBaseName
=
sBaseName
;
m_sClientLoggerBaseName
=
sBaseName
;
m_pClientLogger
->
setOutputFile
(
m_sClientLoggerBaseName
+
".log"
);
m_pClientLogger
->
setOutputFile
(
m_sClientLoggerBaseName
+
"
_Client
.log"
);
m_pMessage
->
SetMessageLoggerBaseName
(
GetClientLoggerBaseName
()
+
"_Messages"
);
m_pMessage
->
SetMessageLoggerBaseName
(
GetClientLoggerBaseName
()
+
"_Messages"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
+
15
−
13
View file @
7468e80f
...
@@ -14,17 +14,18 @@
...
@@ -14,17 +14,18 @@
using
namespace
std
;
using
namespace
std
;
string
g_sServerName
=
"
localhost
"
;
string
g_sServerName
=
"
137.226.61.85
"
;
int
g_iServerPort
=
12480
;
int
g_iServerPort
=
12480
;
double
g_dSampleRate
=
44100.0
;
double
g_dSampleRate
=
44100.0
;
int
g_iBlockLength
=
64
;
int
g_iBlockLength
=
32
;
int
g_iChannels
=
2
;
int
g_iChannels
=
2
;
int
g_iRingBufferSize
=
88200
;
int
g_iTargetLatencySamples
=
2
*
g_iBlockLength
;
// 1.4512ms
int
g_iRingBufferSize
=
2
*
g_iTargetLatencySamples
;
double
g_dPlaybackDuration
=
10
;
// seconds
double
g_dPlaybackDuration
=
10
;
// seconds
int
main
(
int
argc
,
char
*
argv
[]
)
int
main
(
int
argc
,
char
*
argv
[]
)
{
{
if
(
argc
>=
7
)
if
(
argc
>=
8
)
{
{
g_sServerName
=
argv
[
1
];
g_sServerName
=
argv
[
1
];
...
@@ -34,15 +35,16 @@ int main( int argc, char* argv[] )
...
@@ -34,15 +35,16 @@ int main( int argc, char* argv[] )
g_dSampleRate
=
strtod
(
argv
[
3
],
NULL
);
g_dSampleRate
=
strtod
(
argv
[
3
],
NULL
);
g_iBlockLength
=
atoi
(
argv
[
4
]
);
g_iBlockLength
=
atoi
(
argv
[
4
]
);
g_iChannels
=
atoi
(
argv
[
5
]);
g_iChannels
=
atoi
(
argv
[
5
]);
g_iRingBufferSize
=
atoi
(
argv
[
6
]
);
g_iTargetLatencySamples
=
atoi
(
argv
[
6
]);
g_iRingBufferSize
=
atoi
(
argv
[
7
]);
}
}
if
(
argc
>=
8
)
if
(
argc
>=
9
)
g_dPlaybackDuration
=
strtod
(
argv
[
7
],
NULL
);;
g_dPlaybackDuration
=
strtod
(
argv
[
8
],
NULL
);;
}
}
else
else
{
{
cout
<<
"Syntax: ServerName ServerPort SampleRate BufferSize Channel RingBufferSize"
<<
endl
;
cout
<<
"Syntax: ServerName ServerPort SampleRate BufferSize Channel
TargetLatencySamples
RingBufferSize"
<<
endl
;
cout
<<
"Using default values ..."
<<
endl
;
cout
<<
"Using default values ..."
<<
endl
;
}
}
...
@@ -51,9 +53,10 @@ int main( int argc, char* argv[] )
...
@@ -51,9 +53,10 @@ int main( int argc, char* argv[] )
CITANetAudioStream
oNetAudioStream
(
g_iChannels
,
g_dSampleRate
,
g_iBlockLength
,
g_iRingBufferSize
);
CITANetAudioStream
oNetAudioStream
(
g_iChannels
,
g_dSampleRate
,
g_iBlockLength
,
g_iRingBufferSize
);
stringstream
ss
;
stringstream
ss
;
ss
<<
"NetAudioStreaming
Server
Test"
;
ss
<<
"
ITA
NetAudioStreaming
Client
Test"
;
ss
<<
"_C"
<<
g_iChannels
;
ss
<<
"_C"
<<
g_iChannels
;
ss
<<
"_B"
<<
g_iBlockLength
;
ss
<<
"_B"
<<
g_iBlockLength
;
ss
<<
"_TL"
<<
g_iTargetLatencySamples
;
ss
<<
"_RB"
<<
g_iRingBufferSize
;
ss
<<
"_RB"
<<
g_iRingBufferSize
;
oNetAudioStream
.
SetNetAudioStreamingLoggerBaseName
(
ss
.
str
()
);
oNetAudioStream
.
SetNetAudioStreamingLoggerBaseName
(
ss
.
str
()
);
...
@@ -71,7 +74,7 @@ int main( int argc, char* argv[] )
...
@@ -71,7 +74,7 @@ int main( int argc, char* argv[] )
cout
<<
"Will attempt to connect to '"
<<
g_sServerName
<<
"' on port "
<<
g_iServerPort
<<
endl
;
cout
<<
"Will attempt to connect to '"
<<
g_sServerName
<<
"' on port "
<<
g_iServerPort
<<
endl
;
ITAsioInitializeLibrary
();
ITAsioInitializeLibrary
();
ITAsioInitializeDriver
(
"ASIO
Hammerfall DSP
"
);
ITAsioInitializeDriver
(
"ASIO
MADIface USB
"
);
long
lBuffersize
,
lDummy
;
long
lBuffersize
,
lDummy
;
ITAsioGetBufferSize
(
&
lDummy
,
&
lDummy
,
&
lBuffersize
,
&
lDummy
);
ITAsioGetBufferSize
(
&
lDummy
,
&
lDummy
,
&
lBuffersize
,
&
lDummy
);
...
@@ -105,6 +108,5 @@ int main( int argc, char* argv[] )
...
@@ -105,6 +108,5 @@ int main( int argc, char* argv[] )
ITAsioDisposeBuffers
();
ITAsioDisposeBuffers
();
ITAsioFinalizeDriver
();
ITAsioFinalizeDriver
();
ITAsioFinalizeLibrary
();
ITAsioFinalizeLibrary
();
return
0
;
return
0
;
}
}
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