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
d212d013
Commit
d212d013
authored
Feb 16, 2017
by
Anne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Streaming Paras beim Start überarbeitet
parent
8abdf74e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
include/ITANetAudioProtocol.h
include/ITANetAudioProtocol.h
+3
-1
src/ITANetAudioMessage.cpp
src/ITANetAudioMessage.cpp
+4
-2
src/ITANetAudioStreamingClient.cpp
src/ITANetAudioStreamingClient.cpp
+3
-2
src/ITANetAudioStreamingServer.cpp
src/ITANetAudioStreamingServer.cpp
+1
-0
No files found.
include/ITANetAudioProtocol.h
View file @
d212d013
...
...
@@ -72,17 +72,19 @@ public:
int
iChannels
;
double
dSampleRate
;
int
iBlockSize
;
int
iBufferSize
;
inline
StreamingParameters
()
{
iChannels
=
0
;
dSampleRate
=
0.0
f
;
iBlockSize
=
0
;
iBufferSize
=
0
;
};
inline
bool
operator
==
(
const
StreamingParameters
&
rhs
)
{
if
(
(
iChannels
==
rhs
.
iChannels
)
&&
(
dSampleRate
==
rhs
.
dSampleRate
)
&&
(
iBlockSize
==
rhs
.
iBlock
Size
)
)
if
(
(
iChannels
==
rhs
.
iChannels
)
&&
(
dSampleRate
==
rhs
.
dSampleRate
)
&&
(
iBlockSize
==
rhs
.
iBlockSize
)
&&
(
iBufferSize
==
rhs
.
iBuffer
Size
)
)
return
true
;
else
return
false
;
...
...
src/ITANetAudioMessage.cpp
View file @
d212d013
...
...
@@ -311,8 +311,9 @@ CITANetAudioProtocol::StreamingParameters CITANetAudioMessage::ReadStreamingPara
CITANetAudioProtocol
::
StreamingParameters
oParams
;
oParams
.
iChannels
=
ReadInt
();
oParams
.
dSampleRate
=
ReadDouble
();
oParams
.
iBlockSize
=
ReadInt
();
oParams
.
dSampleRate
=
ReadDouble
(
);
oParams
.
iBlockSize
=
ReadInt
(
);
oParams
.
iBufferSize
=
ReadInt
(
);
return
oParams
;
}
...
...
@@ -322,6 +323,7 @@ void CITANetAudioMessage::WriteStreamingParameters( const CITANetAudioProtocol::
WriteInt
(
oParams
.
iChannels
);
WriteDouble
(
oParams
.
dSampleRate
);
WriteInt
(
oParams
.
iBlockSize
);
WriteInt
(
oParams
.
iBufferSize
);
}
int
CITANetAudioMessage
::
ReadRingBufferSize
()
...
...
src/ITANetAudioStreamingClient.cpp
View file @
d212d013
...
...
@@ -54,8 +54,9 @@ CITANetAudioStreamingClient::CITANetAudioStreamingClient( CITANetAudioStream* pP
m_pClient
=
new
CITANetAudioClient
();
m_oParams
.
iChannels
=
pParent
->
GetNumberOfChannels
();
m_oParams
.
dSampleRate
=
pParent
->
GetSampleRate
();
m_oParams
.
iBlockSize
=
pParent
->
GetBlocklength
();
m_oParams
.
dSampleRate
=
pParent
->
GetSampleRate
(
);
m_oParams
.
iBlockSize
=
pParent
->
GetBlocklength
(
);
m_oParams
.
iBufferSize
=
pParent
->
GetRingBufferSize
(
);
std
::
string
paras
=
std
::
string
(
"NetAudioLogClient"
)
+
std
::
string
(
"_BS"
)
+
std
::
to_string
(
pParent
->
GetBlocklength
())
+
std
::
string
(
"_Ch"
)
+
std
::
to_string
(
pParent
->
GetNumberOfChannels
())
+
std
::
string
(
".txt"
);
m_pClientLogger
=
new
ITABufferedDataLoggerImplClient
(
);
...
...
src/ITANetAudioStreamingServer.cpp
View file @
d212d013
...
...
@@ -47,6 +47,7 @@ bool CITANetAudioStreamingServer::Start( const std::string& sAddress, int iPort
CITANetAudioProtocol
::
StreamingParameters
oClientParams
=
m_pMessage
->
ReadStreamingParameters
(
);
bool
bOK
=
false
;
m_oServerParams
.
iBufferSize
=
oClientParams
.
iBufferSize
;
if
(
m_oServerParams
==
oClientParams
)
{
bOK
=
true
;
...
...
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