Skip to content
GitLab
Menu
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
eac2e0db
Commit
eac2e0db
authored
Feb 17, 2017
by
Anne
Browse files
protocol running, springt aber nciht in GetBlockpointer (portaudio)
parent
908d1e5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/ITANetAudioStreamingClient.cpp
View file @
eac2e0db
...
...
@@ -76,11 +76,11 @@ CITANetAudioStreamingClient::~CITANetAudioStreamingClient()
m_pMessage
->
WriteMessage
();
m_pClient
->
Disconnect
();
}
delete
m_pClientLogger
;
//}
//catch (ITAException e){
// std::cout << e << std::endl;
//}
delete
m_pClientLogger
;
}
bool
CITANetAudioStreamingClient
::
Connect
(
const
std
::
string
&
sAddress
,
int
iPort
)
...
...
@@ -99,7 +99,8 @@ bool CITANetAudioStreamingClient::Connect( const std::string& sAddress, int iPor
// Validate streaming parameters of server and client
m_pMessage
->
SetMessageType
(
CITANetAudioProtocol
::
NP_CLIENT_OPEN
);
m_pMessage
->
WriteStreamingParameters
(
m_oParams
);
m_pMessage
->
WriteMessage
();
m_pMessage
->
WriteMessage
(
);
m_pMessage
->
ResetMessage
(
);
while
(
!
m_pMessage
->
ReadMessage
(
0
)
);
...
...
@@ -123,8 +124,8 @@ bool CITANetAudioStreamingClient::LoopBody()
return
true
;
// Send message to server that samples can be received
m_pMessage
->
ResetMessage
();
m_pMessage
->
ResetMessage
(
);
// Read answer
if
(
m_pMessage
->
ReadMessage
(
0
)
)
{
...
...
src/ITANetAudioStreamingServer.cpp
View file @
eac2e0db
...
...
@@ -110,6 +110,7 @@ bool CITANetAudioStreamingServer::Start( const std::string& sAddress, int iPort
bool
CITANetAudioStreamingServer
::
LoopBody
(
)
{
m_pMessage
->
ResetMessage
(
);
ITAServerLog
oLog
;
oLog
.
uiBlockId
=
++
iServerBlockId
;
int
iMsgType
;
...
...
tests/NetAudio/ITANetAudioStreamingPortaudioClientTest.cpp
View file @
eac2e0db
...
...
@@ -41,7 +41,7 @@ int main(int argc, char* argv[])
ITAStreamProbe
oProbe
(
oPatchbay
.
GetOutputDatasource
(
iOutputID
),
"ITANetAudioTest.stream.wav"
);
ITAPortaudioInterface
ITAPA
(
dSampleRate
,
iBufferSize
);
ITAPA
.
Initialize
();
ITAPA
.
SetPlaybackDatasource
(
&
o
Probe
);
ITAPA
.
SetPlaybackDatasource
(
&
o
NetAudioStream
);
ITAPA
.
Open
();
ITAPA
.
Start
();
cout
<<
"Waiting 3 seconds (net audio stream not connected and returning zeros)"
<<
endl
;
...
...
tests/NetAudio/NetAudioServerLog.m
View file @
eac2e0db
...
...
@@ -18,8 +18,20 @@ for k=2:numel(NetAudioLogServer)
end
NetAudioLogServerTab
.
WorldTimeStamp
=
NetAudioLogServerTab
.
WorldTimeStamp
-
minTime
;
% NetAudioLogClient = dir(['NetAudioLogClient_BS' BlockSize '*.txt']);
% NetAudioLogClient = {NetAudioLogClient.name};
% NetAudioLogClientTab = readtable(NetAudioLogClient{1}, 'FileType', 'text', 'Delimiter', '\t');
% minTime = NetAudioLogClientTab.WorldTimeStamp(1);
% maxTime = NetAudioLogClientTab.WorldTimeStamp(end);
% for k=2:numel(NetAudioLogClient)
% temp = readtable(NetAudioLogClient{k}, 'FileType', 'text', 'Delimiter', '\t');
% NetAudioLogClientTab = [NetAudioLogClientTab; temp];
% minTime = min(minTime, temp.WorldTimeStamp(1));
% maxTime = max(maxTime, temp.WorldTimeStamp(end));
% end
%% Protocolstatus ersetzten
hallo
=
[
1
2
;
3
4
];
Protocol
=
{
'100'
,
'NP_CLIENT_OPEN'
;
...
'101'
,
'NP_CLIENT_CLOSE'
;
...
'111'
,
'NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES'
;
...
...
...
@@ -36,4 +48,4 @@ end
%% Plot Protocol
plot
(
NetAudioLogServerTab
.
WorldTimeStamp
,
NetAudioLogServerTab
.
ProtocolStatus
)
hold
on
;
plot
(
NetAudioLogServerTab
.
WorldTimeStamp
,
NetAudioLogServerTab
.
FreeSamples
)
%
plot(NetAudioLogServerTab.WorldTimeStamp, NetAudioLogServerTab.FreeSamples)
Write
Preview
Supports
Markdown
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