Running

parent 1e4743df
......@@ -76,6 +76,12 @@ public:
dSampleRate = 0.0f;
iBlockSize = 0;
};
inline bool operator==( const StreamingParameters& rhs )
{
if( ( iChannels == rhs.iChannels ) && ( dSampleRate == rhs.dSampleRate ) && ( iBlockSize == rhs.iBlockSize ) )
return true;
}
};
};
......
......@@ -50,6 +50,7 @@ public:
bool Connect( const std::string& sAddress, int iPort );
bool GetIsConnected() const;
void Disconnect();
bool LoopBody();
......@@ -59,12 +60,15 @@ private:
CITANetAudioProtocol* m_pProtocol;
CITANetAudioMessage* m_pMessage;
VistaConnectionIP* m_pConnection;
ITASampleFrame m_sfReceivingBuffer; //!< Buffer incoming data
CITANetAudioProtocol::StreamingParameters m_oClientParams;
CITANetAudioProtocol::StreamingParameters m_oServerParams;
bool m_bStopIndicated;
friend class CITANetAudioClient;
};
......
......@@ -12,7 +12,6 @@ CITANetAudioStream::CITANetAudioStream( int iChannels, double dSamplingRate, int
: m_sfOutputStreamBuffer( iChannels, iBufferSize, true )
, m_dSampleRate( dSamplingRate )
, m_sfRingBuffer( iChannels, iRingBufferCapacity, true )
, m_dSampleRate( dSamplingRate )
{
if( iBufferSize > iRingBufferCapacity )
......
#include <ITANetAudioStreamingCLient.h>
#include <ITANetAudioStreamingClient.h>
#include <ITANetAudioClient.h>
#include <ITANetAudioMessage.h>
#include <ITANetAudioStream.h>
#include <ITANetAudioProtocol.h>
#include <VistaInterProcComm/Connections/VistaConnectionIP.h>
CITANetAudioStreamingClient::CITANetAudioStreamingClient( CITANetAudioStream* pParent )
: m_pParent( pParent )
: m_pStream( pParent )
, m_pConnection( NULL )
, m_bStopIndicated( false )
{
m_pClient = new CITANetAudioClient( this );
m_pClient = new CITANetAudioClient();
m_oClientParams.iChannels = pParent->GetNumberOfChannels();
m_oClientParams.dSampleRate = pParent->GetSampleRate();
......@@ -28,7 +30,7 @@ CITANetAudioStreamingClient::~CITANetAudioStreamingClient()
bool CITANetAudioStreamingClient::Connect( const std::string& sAddress, int iPort )
{
if( GetIsConnected )
if( GetIsConnected() )
return false;
if( !m_pClient->Connect( sAddress, iPort ) )
......
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