Commit ed170e0f authored by Anne Heimes's avatar Anne Heimes
Browse files

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

parents 90a01fef e7d71ecd
...@@ -69,7 +69,7 @@ CITANetAudioStreamingClient::CITANetAudioStreamingClient( CITANetAudioStream* pP ...@@ -69,7 +69,7 @@ CITANetAudioStreamingClient::CITANetAudioStreamingClient( CITANetAudioStream* pP
m_pClientLogger = new ITABufferedDataLoggerImplClient(); m_pClientLogger = new ITABufferedDataLoggerImplClient();
SetClientLoggerBaseName( "ITANetAudioStreamingClient" ); SetClientLoggerBaseName( "ITANetAudioStreamingClient" );
VistaThread::SetPriority( VistaPriority::VISTA_MID_PRIORITY ); //SetPriority( VistaPriority::VISTA_MID_PRIORITY );
} }
CITANetAudioStreamingClient::~CITANetAudioStreamingClient() CITANetAudioStreamingClient::~CITANetAudioStreamingClient()
......
...@@ -69,7 +69,7 @@ CITANetAudioStreamingServer::CITANetAudioStreamingServer() ...@@ -69,7 +69,7 @@ CITANetAudioStreamingServer::CITANetAudioStreamingServer()
m_iMaxSendBlocks = 40; m_iMaxSendBlocks = 40;
m_iEstimatedClientRingBufferFreeSamples = 0; m_iEstimatedClientRingBufferFreeSamples = 0;
VistaThread::SetPriority( VistaPriority::VISTA_MID_PRIORITY ); //SetPriority( VistaPriority::VISTA_MID_PRIORITY );
} }
CITANetAudioStreamingServer::~CITANetAudioStreamingServer() CITANetAudioStreamingServer::~CITANetAudioStreamingServer()
......
...@@ -24,13 +24,15 @@ const static string g_sServerName = "localhost"; ...@@ -24,13 +24,15 @@ const static string g_sServerName = "localhost";
const static string g_sInputFilePath = "gershwin-mono.wav"; const static string g_sInputFilePath = "gershwin-mono.wav";
const static int g_iServerPort = 12480; const static int g_iServerPort = 12480;
const static double g_dSampleRate = 44100; const static double g_dSampleRate = 44100;
const static int g_iBlockLength = 512; const static int g_iBlockLength = 256;
const static int g_iChannels = 2; const static int g_iChannels = 2;
const static int g_iTargetLatencySamples = g_iBlockLength * 3; const static int g_iTargetLatencySamples = g_iBlockLength * 1;
const static int g_iRingerBufferCapacity = g_iBlockLength * 4; const static int g_iRingerBufferCapacity = g_iBlockLength * 5;
const static double g_dDuration = 10.0f; const static double g_dDuration = 10.0f;
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";
class CServer : public VistaThread class CServer : public VistaThread
{ {
...@@ -62,7 +64,7 @@ public: ...@@ -62,7 +64,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, 0.1 ); pStreamingServer->Start( g_sServerName, g_iServerPort, g_dSyncTimout );
}; };
private: private:
......
...@@ -6,9 +6,9 @@ ITANetAudioTest_Client_NetworkStream = readtable( 'ITANetAudioTest_Client_Networ ...@@ -6,9 +6,9 @@ ITANetAudioTest_Client_NetworkStream = readtable( 'ITANetAudioTest_Client_Networ
%% Settings %% Settings
B = 512; B = 265;
TL = B*3; TL = B * 1;
RB = B*4; RB = B * 5;
%% Analyse %% Analyse
...@@ -27,7 +27,9 @@ ClientAudioStreamTiming = diff( ITANetAudioTest_Client_AudioStream.WorldTimeStam ...@@ -27,7 +27,9 @@ ClientAudioStreamTiming = diff( ITANetAudioTest_Client_AudioStream.WorldTimeStam
ClientNetStreamTiming = diff( ITANetAudioTest_Client_NetworkStream.WorldTimeStamp ); ClientNetStreamTiming = diff( ITANetAudioTest_Client_NetworkStream.WorldTimeStamp );
%% Plot %% Plot
figure
subplot( 2, 1, 1 ) subplot( 2, 1, 1 )
% Client % Client
plot( ITANetAudioTest_Client.WorldTimeStamp - TS, RB - ITANetAudioTest_Client.FreeSamples, 'LineWidth', 1 ) plot( ITANetAudioTest_Client.WorldTimeStamp - TS, RB - ITANetAudioTest_Client.FreeSamples, 'LineWidth', 1 )
hold on hold on
......
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