Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITADataSources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
ITADataSources
Commits
7468e80f
Commit
7468e80f
authored
Mar 28, 2017
by
Anne Heimes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ba_2016_heimes' of
https://git.rwth-aachen.de/ita/ITADataSources
into ba_2016_heimes
parents
ed170e0f
fbe6a4d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
src/ITANetAudioStreamingClient.cpp
src/ITANetAudioStreamingClient.cpp
+1
-1
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
+15
-13
No files found.
src/ITANetAudioStreamingClient.cpp
View file @
7468e80f
...
...
@@ -228,7 +228,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB
{
m_sClientLoggerBaseName
=
sBaseName
;
m_pClientLogger
->
setOutputFile
(
m_sClientLoggerBaseName
+
".log"
);
m_pClientLogger
->
setOutputFile
(
m_sClientLoggerBaseName
+
"
_Client
.log"
);
m_pMessage
->
SetMessageLoggerBaseName
(
GetClientLoggerBaseName
()
+
"_Messages"
);
}
...
...
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
View file @
7468e80f
...
...
@@ -14,17 +14,18 @@
using
namespace
std
;
string
g_sServerName
=
"
localhost
"
;
string
g_sServerName
=
"
137.226.61.85
"
;
int
g_iServerPort
=
12480
;
double
g_dSampleRate
=
44100.0
;
int
g_iBlockLength
=
64
;
int
g_iBlockLength
=
32
;
int
g_iChannels
=
2
;
int
g_iRingBufferSize
=
88200
;
double
g_dPlaybackDuration
=
10
;
// seconds
int
g_iTargetLatencySamples
=
2
*
g_iBlockLength
;
// 1.4512ms
int
g_iRingBufferSize
=
2
*
g_iTargetLatencySamples
;
double
g_dPlaybackDuration
=
10
;
// seconds
int
main
(
int
argc
,
char
*
argv
[]
)
{
if
(
argc
>=
7
)
if
(
argc
>=
8
)
{
g_sServerName
=
argv
[
1
];
...
...
@@ -33,16 +34,17 @@ int main( int argc, char* argv[] )
g_iServerPort
=
atoi
(
argv
[
2
]
);
g_dSampleRate
=
strtod
(
argv
[
3
],
NULL
);
g_iBlockLength
=
atoi
(
argv
[
4
]
);
g_iChannels
=
atoi
(
argv
[
5
]
);
g_iRingBufferSize
=
atoi
(
argv
[
6
]
);
g_iChannels
=
atoi
(
argv
[
5
]);
g_iTargetLatencySamples
=
atoi
(
argv
[
6
]);
g_iRingBufferSize
=
atoi
(
argv
[
7
]);
}
if
(
argc
>=
8
)
g_dPlaybackDuration
=
strtod
(
argv
[
7
],
NULL
);;
if
(
argc
>=
9
)
g_dPlaybackDuration
=
strtod
(
argv
[
8
],
NULL
);;
}
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
;
}
...
...
@@ -51,9 +53,10 @@ int main( int argc, char* argv[] )
CITANetAudioStream
oNetAudioStream
(
g_iChannels
,
g_dSampleRate
,
g_iBlockLength
,
g_iRingBufferSize
);
stringstream
ss
;
ss
<<
"
NetAudioStreamingServer
Test"
;
ss
<<
"
ITANetAudioStreamingClient
Test"
;
ss
<<
"_C"
<<
g_iChannels
;
ss
<<
"_B"
<<
g_iBlockLength
;
ss
<<
"_TL"
<<
g_iTargetLatencySamples
;
ss
<<
"_RB"
<<
g_iRingBufferSize
;
oNetAudioStream
.
SetNetAudioStreamingLoggerBaseName
(
ss
.
str
()
);
...
...
@@ -71,7 +74,7 @@ int main( int argc, char* argv[] )
cout
<<
"Will attempt to connect to '"
<<
g_sServerName
<<
"' on port "
<<
g_iServerPort
<<
endl
;
ITAsioInitializeLibrary
();
ITAsioInitializeDriver
(
"ASIO
Hammerfall DSP
"
);
ITAsioInitializeDriver
(
"ASIO
MADIface USB
"
);
long
lBuffersize
,
lDummy
;
ITAsioGetBufferSize
(
&
lDummy
,
&
lDummy
,
&
lBuffersize
,
&
lDummy
);
...
...
@@ -105,6 +108,5 @@ int main( int argc, char* argv[] )
ITAsioDisposeBuffers
();
ITAsioFinalizeDriver
();
ITAsioFinalizeLibrary
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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