Commit 376eb96c authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Updating some more interfaces and retrating default options where interface is...

Updating some more interfaces and retrating default options where interface is not used by external user
parent 24913538
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
~CITANetAudioStreamingServer(); ~CITANetAudioStreamingServer();
//! Start to listen on a socket (blocking) //! Start to listen on a socket (blocking)
bool Start( const std::string& sAddress, const int iPort, const double dTimeIntervalCientSendStatus ); bool Start( const std::string& sAddress, const int iPort, const double dTimeIntervalCientSendStatus, const bool bUseUDP = false );
bool IsClientConnected() const; bool IsClientConnected() const;
std::string GetNetworkAddress() const; std::string GetNetworkAddress() const;
int GetNetworkPort() const; int GetNetworkPort() const;
......
...@@ -52,7 +52,7 @@ int CITANetAudioServer::GetNetworkPort() const ...@@ -52,7 +52,7 @@ int CITANetAudioServer::GetNetworkPort() const
return m_iServerPort; return m_iServerPort;
} }
bool CITANetAudioServer::Start( const std::string& sAddress, const int iPort, const bool bUseUDP /* = false */ ) bool CITANetAudioServer::Start( const std::string& sAddress, const int iPort, const bool bUseUDP )
{ {
if( m_pTCPServer || m_pUDPSocket ) if( m_pTCPServer || m_pUDPSocket )
ITA_EXCEPT1( MODAL_EXCEPTION, "This NetAudio server is already started" ); ITA_EXCEPT1( MODAL_EXCEPTION, "This NetAudio server is already started" );
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
std::string GetServerAddress() const; std::string GetServerAddress() const;
int GetNetworkPort() const; int GetNetworkPort() const;
bool Start( const std::string& sAddress, const int iPort, const bool bUseUDP = false ); bool Start( const std::string& sAddress, const int iPort, const bool bUseUDP );
void Stop(); void Stop();
VistaConnectionIP* GetConnection() const; VistaConnectionIP* GetConnection() const;
......
...@@ -256,7 +256,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB ...@@ -256,7 +256,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB
m_pMessage->SetMessageLoggerBaseName( GetClientLoggerBaseName() + "_Messages" ); m_pMessage->SetMessageLoggerBaseName( GetClientLoggerBaseName() + "_Messages" );
} }
void CITANetAudioStreamingClient::SetDebuggingEnabled( bool bEnabled ) void CITANetAudioStreamingClient::SetDebuggingEnabled( const bool bEnabled )
{ {
m_bDebuggingEnabled = bEnabled; m_bDebuggingEnabled = bEnabled;
m_pMessage->SetDebuggingEnabled( bEnabled ); m_pMessage->SetDebuggingEnabled( bEnabled );
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
std::string GetClientLoggerBaseName() const; std::string GetClientLoggerBaseName() const;
void SetClientLoggerBaseName( const std::string& ); void SetClientLoggerBaseName( const std::string& );
void SetDebuggingEnabled( bool bEnabled ); void SetDebuggingEnabled( const bool bEnabled );
bool GetIsDebuggingEnabled() const; bool GetIsDebuggingEnabled() const;
protected: protected:
......
...@@ -89,12 +89,12 @@ CITANetAudioStreamingServer::~CITANetAudioStreamingServer() ...@@ -89,12 +89,12 @@ CITANetAudioStreamingServer::~CITANetAudioStreamingServer()
} }
bool CITANetAudioStreamingServer::Start( const std::string& sAddress, const int iPort, const double dTimeIntervalCientSendStatus ) bool CITANetAudioStreamingServer::Start( const std::string& sAddress, const int iPort, const double dTimeIntervalCientSendStatus, const bool bUseUDP /* = false */ )
{ {
if( !m_pInputStream ) if( !m_pInputStream )
ITA_EXCEPT1( MODAL_EXCEPTION, "Can not start server without a valid input stream" ); ITA_EXCEPT1( MODAL_EXCEPTION, "Can not start server without a valid input stream" );
if( !m_pNetAudioServer->Start( sAddress, iPort ) ) // blocking if( !m_pNetAudioServer->Start( sAddress, iPort, bUseUDP ) ) // blocking
return false; return false;
m_pConnection = m_pNetAudioServer->GetConnection(); m_pConnection = m_pNetAudioServer->GetConnection();
......
...@@ -32,6 +32,7 @@ const static double g_dSyncTimout = 0.001f; ...@@ -32,6 +32,7 @@ const static double g_dSyncTimout = 0.001f;
const static bool g_bUseASIO = true; const static bool g_bUseASIO = true;
const static string g_sAudioInterface = "ASIO4ALL v2"; const static string g_sAudioInterface = "ASIO4ALL v2";
//const static string g_sAudioInterface = "ASIO Hammerfall DSP"; //const static string g_sAudioInterface = "ASIO Hammerfall DSP";
const static bool g_bUseUDP = false;
class CServer : public VistaThread class CServer : public VistaThread
{ {
...@@ -64,7 +65,7 @@ public: ...@@ -64,7 +65,7 @@ public:
void ThreadBody( ) void ThreadBody( )
{ {
vstr::out() << "[ NetAudioTestServer ] Starting net audio server and waiting for client connections on '" << g_sServerName << "' on port " << g_iServerPort << endl; vstr::out() << "[ NetAudioTestServer ] Starting net audio server and waiting for client connections on '" << g_sServerName << "' on port " << g_iServerPort << endl;
pStreamingServer->Start( g_sServerName, g_iServerPort, g_dSyncTimout ); pStreamingServer->Start( g_sServerName, g_iServerPort, g_dSyncTimout, g_bUseUDP );
}; };
private: private:
...@@ -125,7 +126,7 @@ void run_test() ...@@ -125,7 +126,7 @@ void run_test()
vstr::out() << "[ NetAudioTestClient ] Will now connect to net audio server '" << g_sServerName << "' on port " << g_iServerPort << endl; vstr::out() << "[ NetAudioTestClient ] Will now connect to net audio server '" << g_sServerName << "' on port " << g_iServerPort << endl;
if( !oNetAudioStream.Connect( g_sServerName, g_iServerPort ) ) if( !oNetAudioStream.Connect( g_sServerName, g_iServerPort, g_bUseUDP ) )
ITA_EXCEPT1( INVALID_PARAMETER, "Could not connect to net audio server" ); ITA_EXCEPT1( INVALID_PARAMETER, "Could not connect to net audio server" );
vstr::out() << "[ NetAudioTestClient ] Connected." << endl; vstr::out() << "[ NetAudioTestClient ] Connected." << endl;
......
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