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
e941e65f
Commit
e941e65f
authored
Feb 21, 2017
by
Anne Heimes
Browse files
bugfix recivedByteTatal Error
parent
17506775
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/ITANetAudioMessage.h
View file @
e941e65f
...
...
@@ -97,6 +97,8 @@ public:
private:
int
m_nMessageType
;
int
m_nMessageId
;
unsigned
long
m_iBytesReceivedTotal
;
VistaByteBufferSerializer
m_oOutgoing
;
//!< Serialization buffer for messages
VistaByteBufferDeSerializer
m_oIncoming
;
//!< Deserialization buffer for messages
std
::
vector
<
VistaType
::
byte
>
m_vecIncomingBuffer
;
// Net IO buffer
...
...
src/ITANetAudioMessage.cpp
View file @
e941e65f
...
...
@@ -144,16 +144,16 @@ bool CITANetAudioMessage::ReadMessage( int timeout)
m_vecIncomingBuffer
.
resize
(
nMessagePayloadSize
);
// Receive all incoming data (potentially splitted)
int
iBytesReceivedTotal
=
0
;
while
(
nMessagePayloadSize
>
iBytesReceivedTotal
)
m_
iBytesReceivedTotal
=
0
;
while
(
nMessagePayloadSize
>
m_
iBytesReceivedTotal
)
{
int
iIncommingBytes
=
m_pConnection
->
WaitForIncomingData
(
0
);
int
iBytesReceived
;
if
(
nMessagePayloadSize
<
iIncommingBytes
)
iBytesReceived
=
m_pConnection
->
Receive
(
&
m_vecIncomingBuffer
[
iBytesReceivedTotal
],
nMessagePayloadSize
-
iBytesReceivedTotal
);
iBytesReceived
=
m_pConnection
->
Receive
(
&
m_vecIncomingBuffer
[
m_
iBytesReceivedTotal
],
nMessagePayloadSize
-
m_
iBytesReceivedTotal
);
else
iBytesReceived
=
m_pConnection
->
Receive
(
&
m_vecIncomingBuffer
[
iBytesReceivedTotal
],
iIncommingBytes
);
iBytesReceivedTotal
+=
iBytesReceived
;
iBytesReceived
=
m_pConnection
->
Receive
(
&
m_vecIncomingBuffer
[
m_
iBytesReceivedTotal
],
iIncommingBytes
);
m_
iBytesReceivedTotal
+=
iBytesReceived
;
#if NET_AUDIO_SHOW_TRAFFIC
vstr
::
out
()
<<
"[ CITANetAudioMessage ] "
<<
std
::
setw
(
3
)
<<
std
::
floor
(
iBytesReceivedTotal
/
float
(
nMessagePayloadSize
)
*
100.0
f
)
<<
"% transmitted"
<<
std
::
endl
;
#endif
...
...
src/ITANetAudioStream.cpp
View file @
e941e65f
...
...
@@ -323,7 +323,7 @@ void CITANetAudioStream::IncrementBlockPointer()
oLog
.
iFreeSamples
=
GetRingBufferFreeSamples
(
);
m_pStreamLogger
->
log
(
oLog
);
m_pNetAudioStreamingClient
->
TriggerBlockIncrement
();
//
m_pNetAudioStreamingClient->TriggerBlockIncrement();
}
int
CITANetAudioStream
::
Transmit
(
const
ITASampleFrame
&
sfNewSamples
,
int
iNumSamples
)
...
...
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