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
d212d013
Commit
d212d013
authored
Feb 16, 2017
by
Anne
Browse files
Streaming Paras beim Start überarbeitet
parent
8abdf74e
Changes
4
Hide whitespace changes
Inline
Side-by-side
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
.
iBlockSize
)
)
if
(
(
iChannels
==
rhs
.
iChannels
)
&&
(
dSampleRate
==
rhs
.
dSampleRate
)
&&
(
iBlockSize
==
rhs
.
iBlockSize
)
&&
(
iBufferSize
==
rhs
.
iBufferSize
)
)
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
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