Commit 7468e80f authored by Anne Heimes's avatar Anne Heimes

Merge branch 'ba_2016_heimes' of https://git.rwth-aachen.de/ita/ITADataSources into ba_2016_heimes

parents ed170e0f fbe6a4d5
...@@ -228,7 +228,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB ...@@ -228,7 +228,7 @@ void CITANetAudioStreamingClient::SetClientLoggerBaseName( const std::string& sB
{ {
m_sClientLoggerBaseName = sBaseName; m_sClientLoggerBaseName = sBaseName;
m_pClientLogger->setOutputFile( m_sClientLoggerBaseName + ".log" ); m_pClientLogger->setOutputFile( m_sClientLoggerBaseName + "_Client.log" );
m_pMessage->SetMessageLoggerBaseName( GetClientLoggerBaseName() + "_Messages" ); m_pMessage->SetMessageLoggerBaseName( GetClientLoggerBaseName() + "_Messages" );
} }
......
...@@ -14,17 +14,18 @@ ...@@ -14,17 +14,18 @@
using namespace std; using namespace std;
string g_sServerName = "localhost"; string g_sServerName = "137.226.61.85";
int g_iServerPort = 12480; int g_iServerPort = 12480;
double g_dSampleRate = 44100.0; double g_dSampleRate = 44100.0;
int g_iBlockLength = 64; int g_iBlockLength = 32;
int g_iChannels = 2; int g_iChannels = 2;
int g_iRingBufferSize = 88200; int g_iTargetLatencySamples = 2 * g_iBlockLength; // 1.4512ms
double g_dPlaybackDuration = 10; // seconds int g_iRingBufferSize = 2 * g_iTargetLatencySamples;
double g_dPlaybackDuration = 10 ; // seconds
int main( int argc, char* argv[] ) int main( int argc, char* argv[] )
{ {
if( argc >= 7 ) if( argc >= 8 )
{ {
g_sServerName = argv[ 1 ]; g_sServerName = argv[ 1 ];
...@@ -33,16 +34,17 @@ int main( int argc, char* argv[] ) ...@@ -33,16 +34,17 @@ int main( int argc, char* argv[] )
g_iServerPort = atoi( argv[ 2 ] ); g_iServerPort = atoi( argv[ 2 ] );
g_dSampleRate = strtod( argv[ 3 ], NULL ); g_dSampleRate = strtod( argv[ 3 ], NULL );
g_iBlockLength = atoi( argv[ 4 ] ); g_iBlockLength = atoi( argv[ 4 ] );
g_iChannels = atoi( argv[ 5 ] ); g_iChannels = atoi(argv[5]);
g_iRingBufferSize = atoi( argv[ 6 ] ); g_iTargetLatencySamples = atoi(argv[6]);
g_iRingBufferSize = atoi(argv[7]);
} }
if( argc >= 8 ) if( argc >= 9 )
g_dPlaybackDuration = strtod( argv[ 7 ], NULL );; g_dPlaybackDuration = strtod( argv[ 8 ], NULL );;
} }
else else
{ {
cout << "Syntax: ServerName ServerPort SampleRate BufferSize Channel RingBufferSize" << endl; cout << "Syntax: ServerName ServerPort SampleRate BufferSize Channel TargetLatencySamples RingBufferSize" << endl;
cout << "Using default values ..." << endl; cout << "Using default values ..." << endl;
} }
...@@ -51,9 +53,10 @@ int main( int argc, char* argv[] ) ...@@ -51,9 +53,10 @@ int main( int argc, char* argv[] )
CITANetAudioStream oNetAudioStream( g_iChannels, g_dSampleRate, g_iBlockLength, g_iRingBufferSize ); CITANetAudioStream oNetAudioStream( g_iChannels, g_dSampleRate, g_iBlockLength, g_iRingBufferSize );
stringstream ss; stringstream ss;
ss << "NetAudioStreamingServerTest"; ss << "ITANetAudioStreamingClientTest";
ss << "_C" << g_iChannels; ss << "_C" << g_iChannels;
ss << "_B" << g_iBlockLength; ss << "_B" << g_iBlockLength;
ss << "_TL" << g_iTargetLatencySamples;
ss << "_RB" << g_iRingBufferSize; ss << "_RB" << g_iRingBufferSize;
oNetAudioStream.SetNetAudioStreamingLoggerBaseName( ss.str() ); oNetAudioStream.SetNetAudioStreamingLoggerBaseName( ss.str() );
...@@ -71,7 +74,7 @@ int main( int argc, char* argv[] ) ...@@ -71,7 +74,7 @@ int main( int argc, char* argv[] )
cout << "Will attempt to connect to '" << g_sServerName << "' on port " << g_iServerPort << endl; cout << "Will attempt to connect to '" << g_sServerName << "' on port " << g_iServerPort << endl;
ITAsioInitializeLibrary(); ITAsioInitializeLibrary();
ITAsioInitializeDriver( "ASIO Hammerfall DSP" ); ITAsioInitializeDriver( "ASIO MADIface USB" );
long lBuffersize, lDummy; long lBuffersize, lDummy;
ITAsioGetBufferSize( &lDummy, &lDummy, &lBuffersize, &lDummy ); ITAsioGetBufferSize( &lDummy, &lDummy, &lBuffersize, &lDummy );
...@@ -105,6 +108,5 @@ int main( int argc, char* argv[] ) ...@@ -105,6 +108,5 @@ int main( int argc, char* argv[] )
ITAsioDisposeBuffers(); ITAsioDisposeBuffers();
ITAsioFinalizeDriver(); ITAsioFinalizeDriver();
ITAsioFinalizeLibrary(); ITAsioFinalizeLibrary();
return 0; return 0;
} }
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