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
a839b645
Commit
a839b645
authored
Feb 21, 2017
by
Anne Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugixes, running new protocol 2
parent
e378f4a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
34 deletions
+44
-34
include/ITANetAudioMessage.h
include/ITANetAudioMessage.h
+3
-0
src/ITANetAudioMessage.cpp
src/ITANetAudioMessage.cpp
+0
-6
src/ITANetAudioStreamingClient.cpp
src/ITANetAudioStreamingClient.cpp
+6
-5
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
+4
-4
tests/NetAudio/NetAudioServerLog.m
tests/NetAudio/NetAudioServerLog.m
+31
-19
No files found.
include/ITANetAudioMessage.h
View file @
a839b645
...
...
@@ -104,6 +104,9 @@ private:
std
::
vector
<
VistaType
::
byte
>
m_vecIncomingBuffer
;
// Net IO buffer
VistaConnectionIP
*
m_pConnection
;
//DEBUG
int
i
;
};
#endif // INCLUDE_WATCHER_ITA_NET_AUDIO_MESSAGE
src/ITANetAudioMessage.cpp
View file @
a839b645
...
...
@@ -141,11 +141,6 @@ bool CITANetAudioMessage::ReadMessage( int timeout)
// we need at least the two protocol ints
//assert( nMessagePayloadSize >= 2 * sizeof( VistaType::sint32 ) );
if
(
nMessagePayloadSize
>
26000
)
{
int
i
=
0
;
}
if
(
nMessagePayloadSize
>
(
int
)
m_vecIncomingBuffer
.
size
()
)
m_vecIncomingBuffer
.
resize
(
nMessagePayloadSize
);
...
...
@@ -363,7 +358,6 @@ void CITANetAudioMessage::ReadSampleFrame( ITASampleFrame* pSampleFrame )
{
int
iChannels
=
ReadInt
();
int
iSamples
=
ReadInt
();
if
(
pSampleFrame
->
channels
()
!=
iChannels
||
pSampleFrame
->
GetLength
()
!=
iSamples
)
pSampleFrame
->
init
(
iChannels
,
iSamples
,
false
);
...
...
src/ITANetAudioStreamingClient.cpp
View file @
a839b645
...
...
@@ -139,15 +139,16 @@ bool CITANetAudioStreamingClient::LoopBody()
m_pMessage
->
ReadSampleFrame
(
&
m_sfReceivingBuffer
);
if
(
m_pStream
->
GetRingBufferFreeSamples
(
)
>=
m_sfReceivingBuffer
.
GetLength
(
)
)
m_pStream
->
Transmit
(
m_sfReceivingBuffer
,
m_sfReceivingBuffer
.
GetLength
(
)
);
//else
// Fehler
m_pStream
->
Transmit
(
m_sfReceivingBuffer
,
m_sfReceivingBuffer
.
GetLength
()
);
#ifdef NET_AUDIO_SHOW_TRAFFIC
vstr
::
out
()
<<
"[ITANetAudioStreamingClient] Recived "
<<
m_sfReceivingBuffer
.
GetLength
()
<<
" samples"
<<
std
::
endl
;
#endif
break
;
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
->
WriteMessage
(
);
m_pMessage
->
WriteMessage
();
break
;
case
CITANetAudioProtocol
::
NP_SERVER_CLOSE
:
Disconnect
(
);
...
...
tests/NetAudio/ITANetAudioStreamingClientTest.cpp
View file @
a839b645
...
...
@@ -32,7 +32,7 @@ int main(int argc, char* argv[])
cout
<<
"Channel "
<<
iChannels
<<
endl
;
CITANetAudioStream
oNetAudioStream
(
iChannels
,
dSampleRate
,
iBlockLength
,
1
*
iBufferSize
);
/*
ITAStreamPatchbay
oPatchbay
(
dSampleRate
,
iBlockLength
);
oPatchbay
.
AddInput
(
&
oNetAudioStream
);
int
iOutputID
=
oPatchbay
.
AddOutput
(
2
);
...
...
@@ -40,8 +40,8 @@ int main(int argc, char* argv[])
int
N
=
int
(
oNetAudioStream
.
GetNumberOfChannels
(
)
);
for
(
int
i
=
0
;
i
<
N
;
i
++
)
oPatchbay
.
ConnectChannels
(
0
,
i
,
0
,
i
%
2
,
1
/
double
(
N
)
);
*/
//
ITAStreamProbe oProbe( oPatchbay.GetOutputDatasource( iOutputID ), "ITANetAudioTest.stream.wav" );
ITAStreamProbe
oProbe
(
oPatchbay
.
GetOutputDatasource
(
iOutputID
),
"ITANetAudioTest.stream.wav"
);
ITAsioInitializeLibrary
();
...
...
@@ -90,7 +90,7 @@ int main(int argc, char* argv[])
}
ITAsioSetPlaybackDatasource
(
&
oNetAudioStream
);
ITAsioSetPlaybackDatasource
(
&
oProbe
);
if
(
ITAsioStart
()
!=
ASE_OK
)
{
ITAsioFinalizeLibrary
();
...
...
tests/NetAudio/NetAudioServerLog.m
View file @
a839b645
...
...
@@ -63,39 +63,51 @@ TimeServer = {Time100 Time101 Time111 Time200 Time201 Time211 Time222};
%% Plot Protocol
%plot(NetAudioLogServerTab.WorldTimeStamp, NetAudioLogServerTab.ProtocolStatus)
plots1
=
{};
plots2
=
{};
subplot
(
2
,
2
,
1
:
2
)
%subplot(2,2,1:4)
plot
(
NetAudioLogServerTab
.
WorldTimeStamp
,
NetAudioLogServerTab
.
FreeSamples
)
plots1
{
1
}
=
plot
([
10
0
],[
3200
3200
]);
hold
on
%subplot(2,2,3:4)
%plot(NetAudioLogClientTab.WorldTimeStamp, NetAudioLogClientTab.FreeSamples)
plots1
{
2
}
=
plot
(
NetAudioLogServerTab
.
WorldTimeStamp
,
NetAudioLogServerTab
.
FreeSamples
,
'-*'
);
subplot
(
2
,
2
,
3
:
4
)
maxSamples
=
3200
;
plots2
{
1
}
=
plot
([
10
0
],[
3200
3200
]);
hold
on
;
plots2
{
2
}
=
plot
(
NetAudioLogClientTab
.
WorldTimeStamp
,
NetAudioLogClientTab
.
FreeSamples
,
'-*'
);
legendeServer
=
{};
legendeClient
=
{};
legendeServer
{
1
}
=
'Freie Samples Server'
;
legendeClient
{
1
}
=
'Freie Samples Client'
;
legendeServer
{
1
}
=
'Maximal Freie Samples'
;
legendeServer
{
2
}
=
'Freie Samples Server'
;
legendeClient
{
1
}
=
'Maximal Freie Samples'
;
legendeClient
{
2
}
=
'Freie Samples Client'
;
i
=
2
;
j
=
2
;
i
=
3
;
j
=
3
;
for
k
=
(
1
:
7
)
if
size
(
TimeServer
{
k
},
1
)
~=
0
%subplot(2,2,1:4
)
plot
(
TimeServer
{
k
},
ones
(
size
(
TimeServer
{
k
})),
'.'
)
subplot
(
2
,
2
,
1
:
2
)
plot
s1
{
i
}
=
plot
(
TimeServer
{
k
},
ones
(
size
(
TimeServer
{
k
})),
'.'
);
legendeServer
{
i
}
=
Protocol
{
k
,
2
};
i
=
i
+
1
;
end
if
size
(
TimeClient
{
k
},
1
)
~=
0
%subplot(2,2,3:4)
%plot(TimeClient{k}, ones(size(TimeClient{k})),'.')
legendeClient
{
i
}
=
Protocol
{
k
,
2
};
subplot
(
2
,
2
,
3
:
4
)
p
=
1
;
if
k
==
3
p
=
1500
;
end
plots2
{
j
}
=
plot
(
TimeClient
{
k
},
ones
(
size
(
TimeClient
{
k
})),
'.'
);
legendeClient
{
j
}
=
Protocol
{
k
,
2
};
j
=
j
+
1
;
end
end
%
subplot(2,2,1:2)
subplot
(
2
,
2
,
1
:
2
)
title
([
'Protokolstatus Server'
])
xlabel
(
'Zeit in s'
)
legend
(
legendeServer
);
%subplot(2,2,3:4)
%title(['Protokolstatus Client'])
%xlabel('Zeit in s')
%legend(legendeClient);
legend
([
plots1
,
plots2
],
{
legendeServer
,
legendeClient
});
subplot
(
2
,
2
,
3
:
4
)
title
([
'Protokolstatus Client'
])
xlabel
(
'Zeit in s'
)
legend
(
'show'
);
\ No newline at end of file
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