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
e32b6da6
Commit
e32b6da6
authored
Feb 22, 2017
by
Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolving problems with git
parent
6c4f4aa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
src/ITANetAudioStreamingClient.cpp
src/ITANetAudioStreamingClient.cpp
+23
-21
No files found.
src/ITANetAudioStreamingClient.cpp
View file @
e32b6da6
...
...
@@ -137,14 +137,15 @@ bool CITANetAudioStreamingClient::LoopBody()
// Read answer (blocking)
m_pMessage
->
ResetMessage
(
);
if
(
m_pMessage
->
ReadMessage
(
0
)
)
if
(
m_pMessage
->
ReadMessage
(
0
)
)
{
int
iMsgType
=
m_pMessage
->
GetMessageType
(
);
case
CITANetAudioProtocol
::
NP_INVALID
:
int
iMsgType
=
m_pMessage
->
GetMessageType
();
switch
(
iMsgType
)
{
case
CITANetAudioProtocol
::
NP_SERVER_SENDING_SAMPLES
:
m_pMessage
->
ReadSampleFrame
(
&
m_sfReceivingBuffer
);
if
(
m_pStream
->
GetRingBufferFreeSamples
(
)
>=
m_sfReceivingBuffer
.
GetLength
(
)
)
m_pStream
->
Transmit
(
m_sfReceivingBuffer
,
m_sfReceivingBuffer
.
GetLength
()
);
if
(
m_pStream
->
GetRingBufferFreeSamples
()
>=
m_sfReceivingBuffer
.
GetLength
(
)
)
m_pStream
->
Transmit
(
m_sfReceivingBuffer
,
m_sfReceivingBuffer
.
GetLength
()
);
#ifdef NET_AUDIO_SHOW_TRAFFIC
vstr
::
out
()
<<
"[ITANetAudioStreamingClient] Recived "
<<
m_sfReceivingBuffer
.
GetLength
()
<<
" samples"
<<
std
::
endl
;
#endif
...
...
@@ -152,16 +153,17 @@ bool CITANetAudioStreamingClient::LoopBody()
case
CITANetAudioProtocol
::
NP_SERVER_GET_RINGBUFFER_FREE_SAMPLES
:
m_pMessage
->
ReadBool
();
m_pMessage
->
SetMessageType
(
CITANetAudioProtocol
::
NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES
);
m_pMessage
->
WriteInt
(
m_pStream
->
GetRingBufferFreeSamples
(
)
);
m_pMessage
->
WriteInt
(
m_pStream
->
GetRingBufferFreeSamples
(
)
);
m_pMessage
->
WriteMessage
();
break
;
case
CITANetAudioProtocol
::
NP_SERVER_CLOSE
:
Disconnect
(
);
Disconnect
(
);
break
;
default:
vstr
::
out
(
)
<<
"[ITANetAudioStreamingServer] Unkown protocol type : "
<<
iMsgType
<<
std
::
endl
;
vstr
::
out
(
)
<<
"[ITANetAudioStreamingServer] Unkown protocol type : "
<<
iMsgType
<<
std
::
endl
;
break
;
}
oLog
.
iChannel
=
m_pStream
->
GetNumberOfChannels
();
oLog
.
iProtocolStatus
=
iMsgType
;
oLog
.
iFreeSamples
=
m_pStream
->
GetRingBufferFreeSamples
();
...
...
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