Commit eac2e0db authored by Anne's avatar Anne

protocol running, springt aber nciht in GetBlockpointer (portaudio)

parent 908d1e5a
......@@ -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 ) )
{
......
......@@ -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;
......
......@@ -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( &oProbe );
ITAPA.SetPlaybackDatasource( &oNetAudioStream );
ITAPA.Open();
ITAPA.Start();
cout << "Waiting 3 seconds (net audio stream not connected and returning zeros)" << endl;
......
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment