Commit d3061538 authored by Anne Heimes's avatar Anne Heimes

Log Latenz angepasst, schleife im test für test mehrere kanäle

parent 5b5caddc
......@@ -21,6 +21,7 @@ struct ITAAudioLog : public ITALogDataBase
{
inline static std::ostream& outputDesc( std::ostream& os )
{
os << "WorldTimeStamp";
os << "\t" << "Channel";
os << "\t" << "Samplerate";
os << "\t" << "BufferSize";
......@@ -32,6 +33,7 @@ struct ITAAudioLog : public ITALogDataBase
inline std::ostream& outputData( std::ostream& os ) const
{
os << dWorldTimeStamp;
os << "\t" << iChannel;
os << "\t" << dSampleRate;
os << "\t" << iBufferSize;
......@@ -41,6 +43,7 @@ struct ITAAudioLog : public ITALogDataBase
return os;
};
double dWorldTimeStamp;
int iChannel;
double dSampleRate;
int iBufferSize;
......@@ -57,6 +60,7 @@ struct ITAStreamLog : public ITALogDataBase
os << "\t" << "StreamingTimeCode";
os << "\t" << "StreamingStatus";
os << "\t" << "FreeSamples";
os << "\t" << "Channel";
os << std::endl;
return os;
};
......@@ -68,6 +72,7 @@ struct ITAStreamLog : public ITALogDataBase
os << "\t" << std::setprecision( 12 ) << dStreamingTimeCode;
os << "\t" << iStreamingStatus;
os << "\t" << iFreeSamples;
os << "\t" << iChannel;
os << std::endl;
return os;
};
......@@ -77,6 +82,7 @@ struct ITAStreamLog : public ITALogDataBase
double dStreamingTimeCode;
int iStreamingStatus; //!< ... usw
int iFreeSamples;
int iChannel;
};
......@@ -137,19 +143,25 @@ CITANetAudioStream::CITANetAudioStream( int iChannels, double dSamplingRate, int
m_iStreamingStatus = STOPPED;
// Logging
char name[50];
m_pAudioLogger = new ITABufferedDataLoggerImplAudio( );
m_pAudioLogger->setOutputFile( "NetAudioLogBaseData.txt" );
sprintf(name, "NetAudioLogBaseData_BS%i_Ch%i.txt", GetRingBufferSize(), GetNumberOfChannels());
m_pAudioLogger->setOutputFile(name);
m_pStreamLogger = new ITABufferedDataLoggerImplStream();
m_pStreamLogger->setOutputFile( "NetAudioLogStream.txt" );
sprintf(name, "NetAudioLogStream_BS%i_Ch%i.txt", GetRingBufferSize(), GetNumberOfChannels());
m_pStreamLogger->setOutputFile(name);
iAudioStreamingBlockID = 0;
m_pNetLogger = new ITABufferedDataLoggerImplNet();
m_pNetLogger->setOutputFile( "NetAudioLogNet.txt" );
sprintf(name, "NetAudioLogNet_BS%i_Ch%i.txt", GetRingBufferSize(), GetNumberOfChannels());
m_pNetLogger->setOutputFile(name);
iNetStreamingBlockID = 0;
// Logging Base Data
ITAAudioLog oLog;
oLog.dWorldTimeStamp = ITAClock::getDefaultClock()->getTime();
oLog.iChannel = GetNumberOfChannels();
oLog.dSampleRate = m_dSampleRate;
oLog.iBufferSize = GetBlocklength();
......@@ -313,6 +325,7 @@ void CITANetAudioStream::IncrementBlockPointer()
oLog.dStreamingTimeCode = m_dLastStreamingTimeCode;
oLog.uiBlockId = ++iAudioStreamingBlockID;
oLog.iFreeSamples = GetRingBufferFreeSamples( );
oLog.iChannel = GetNumberOfChannels();
m_pStreamLogger->log( oLog );
m_pNetAudioStreamingClient->TriggerBlockIncrement();
......
......@@ -18,6 +18,7 @@ struct ITAClientLog : public ITALogDataBase
os << "\t" << "WorldTimeStamp";
os << "\t" << "ProtocolStatus";
os << "\t" << "FreeSamples";
os << "\t" << "Channel";
os << std::endl;
return os;
};
......@@ -28,6 +29,7 @@ struct ITAClientLog : public ITALogDataBase
os << "\t" << std::setprecision( 12 ) << dWorldTimeStamp;
os << "\t" << iProtocolStatus;
os << "\t" << iFreeSamples;
os << "\t" << iChannel;
os << std::endl;
return os;
};
......@@ -36,6 +38,7 @@ struct ITAClientLog : public ITALogDataBase
double dWorldTimeStamp;
int iProtocolStatus; //!< ... usw
int iFreeSamples;
int iChannel;
};
......@@ -54,7 +57,10 @@ CITANetAudioStreamingClient::CITANetAudioStreamingClient( CITANetAudioStream* pP
m_oParams.dSampleRate = pParent->GetSampleRate();
m_oParams.iBlockSize = pParent->GetBlocklength();
m_pClientLogger = new ITABufferedDataLoggerImplClient( );
m_pClientLogger->setOutputFile("NetAudioLogClient.txt");
char name[50];
sprintf(name, "NetAudioLogClient_BS%i_Ch%i.txt", m_pStream->GetRingBufferSize(), m_pStream->GetNumberOfChannels());
m_pClientLogger->setOutputFile(name);
iStreamingBlockId = 0;
m_pMessage = new CITANetAudioMessage( VistaSerializingToolset::SWAPS_MULTIBYTE_VALUES );
}
......@@ -156,6 +162,7 @@ bool CITANetAudioStreamingClient::LoopBody()
}
oLog.iProtocolStatus = iAnswerType;
oLog.dWorldTimeStamp = ITAClock::getDefaultClock( )->getTime( );
oLog.iChannel = m_pStream->GetNumberOfChannels();
m_pClientLogger->log( oLog );
return true;
}
......
......@@ -17,122 +17,123 @@ using namespace std;
static string g_sServerName = "137.226.61.85";
static int g_iServerPort = 12480;
static double g_dSampleRate = 44100;
static int g_iBufferSize = 32;
static int g_iChannels = 10;
static int g_iBufferSize = 512;
static int g_iChannels = 0;
int main( int , char** )
{
std::cout << "BufferSize: " << endl;
cin >> g_iBufferSize;
cout << "ChannelAnzahl: " << endl;
cin >> g_iChannels;
while (g_iChannels < 20)
{
g_iChannels++;
cout << "Starte mit Anzahl Channel " << g_iChannels << endl;
CITANetAudioStream oNetAudioStream( g_iChannels, g_dSampleRate, g_iBufferSize, 1 * g_iBufferSize );
CITANetAudioStream oNetAudioStream( g_iChannels, g_dSampleRate, g_iBufferSize, 1 * g_iBufferSize );
ITAStreamPatchbay oPatchbay( g_dSampleRate, g_iBufferSize );
oPatchbay.AddInput( &oNetAudioStream );
int iOutputID = oPatchbay.AddOutput( 2 );
ITAStreamPatchbay oPatchbay( g_dSampleRate, g_iBufferSize );
oPatchbay.AddInput( &oNetAudioStream );
int iOutputID = oPatchbay.AddOutput( 2 );
int N = int( oNetAudioStream.GetNumberOfChannels( ) );
for ( int i = 0; i < N; i++ )
oPatchbay.ConnectChannels( 0, i, 0, i % 2, 1 / double( N ) );
int N = int( oNetAudioStream.GetNumberOfChannels( ) );
for ( int i = 0; i < N; i++ )
oPatchbay.ConnectChannels( 0, i, 0, i % 2, 1 / double( N ) );
ITAStreamProbe oProbe( oPatchbay.GetOutputDatasource( iOutputID ), "ITANetAudioTest.stream.wav" );
ITAStreamProbe oProbe( oPatchbay.GetOutputDatasource( iOutputID ), "ITANetAudioTest.stream.wav" );
ITAsioInitializeLibrary();
ITAsioInitializeLibrary();
try {
try {
cout << "Will now connect to '" << g_sServerName << "' on port " << g_iServerPort << endl;
cout << "Will now connect to '" << g_sServerName << "' on port " << g_iServerPort << endl;
if (ITAsioInitializeDriver("ASIO MADIface USB") != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioInit schlug fehl!\n");
if (ITAsioInitializeDriver("ASIO MADIface USB") != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioInit schlug fehl!\n");
return 255;
}
return 255;
}
long lBuffersize, lDummy;
if (ITAsioGetBufferSize(&lDummy, &lDummy, &lBuffersize, &lDummy) != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioGetBufferSize schlug fehl!\n");
long lBuffersize, lDummy;
if (ITAsioGetBufferSize(&lDummy, &lDummy, &lBuffersize, &lDummy) != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioGetBufferSize schlug fehl!\n");
return 255;
}
return 255;
}
if (ITAsioSetSampleRate((ASIOSampleRate)g_dSampleRate) != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioSetSamplerate schlug fehl!\n");
if (ITAsioSetSampleRate((ASIOSampleRate)g_dSampleRate) != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioSetSamplerate schlug fehl!\n");
return 255;
}
return 255;
}
long lNumInputChannels, lNumOutputChannels;
ASIOError ae;
if ((ae = ITAsioGetChannels(&lNumInputChannels, &lNumOutputChannels)) != ASE_OK)
{
cerr << "Error in ITAsioGetChannels, ASIO error " << ae << " encountered" << endl;
ITAsioFinalizeLibrary();
return 255;
}
long lNumInputChannels, lNumOutputChannels;
ASIOError ae;
if ((ae = ITAsioGetChannels(&lNumInputChannels, &lNumOutputChannels)) != ASE_OK)
{
cerr << "Error in ITAsioGetChannels, ASIO error " << ae << " encountered" << endl;
ITAsioFinalizeLibrary();
return 255;
}
if ((ae = ITAsioCreateBuffers(0, 2, lBuffersize)) != ASE_OK)
{
cerr << "Error in ITAsioCreateBuffers, ASIO error " << ae << " encountered" << endl;
ITAsioFinalizeLibrary();
return 255;
}
if ((ae = ITAsioCreateBuffers(0, 2, lBuffersize)) != ASE_OK)
{
cerr << "Error in ITAsioCreateBuffers, ASIO error " << ae << " encountered" << endl;
ITAsioFinalizeLibrary();
return 255;
}
ITAsioSetPlaybackDatasource(&oProbe);
ITAsioSetPlaybackDatasource(&oProbe);
if (ITAsioStart() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioStart schlug fehl!\n");
if (ITAsioStart() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioStart schlug fehl!\n");
return 255;
}
return 255;
}
if (!oNetAudioStream.Connect(g_sServerName, g_iServerPort))
ITA_EXCEPT1(INVALID_PARAMETER, "Could not connect to server");
VistaTimeUtils::Sleep(2 * 1000);
printf("Wiedergabe gestartet ...\n");
VistaTimeUtils::Sleep(20 * 1000);
if (!oNetAudioStream.Connect(g_sServerName, g_iServerPort))
ITA_EXCEPT1(INVALID_PARAMETER, "Could not connect to server");
printf("Wiedergabe gestartet ...\n");
VistaTimeUtils::Sleep(10 * 1000);
if (ITAsioStop() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioStop schlug fehl!\n");
if (ITAsioStop() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioStop schlug fehl!\n");
return 255;
}
return 255;
}
printf("Wiedergabe beendet!\n");
printf("Wiedergabe beendet!\n");
if (ITAsioDisposeBuffers() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioDisposeBuffers schlug fehl!\n");
if (ITAsioDisposeBuffers() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioDisposeBuffers schlug fehl!\n");
return 255;
}
return 255;
}
if (ITAsioFinalizeDriver() != ASE_OK) {
if (ITAsioFinalizeDriver() != ASE_OK) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioExit schlug fehl!\n");
return 255;
}
}
catch (ITAException e) {
ITAsioFinalizeLibrary();
fprintf(stderr, "Fehler: ITAsioExit schlug fehl!\n");
cerr << e << endl;
return 255;
}
}
catch (ITAException e) {
ITAsioFinalizeLibrary();
cerr << e << endl;
return 255;
ITAsioFinalizeLibrary();
}
ITAsioFinalizeLibrary();
return 0;
}
%% Einlesen der Logs
close all;
clear all;
NetAudioLogNet = readtable( 'NetAudioLogNet.txt', 'FileType', 'text', 'Delimiter', '\t');
NetAudioLogStream = readtable( 'NetAudioLogStream.txt', 'FileType', 'text', 'Delimiter', '\t')
NetAudioLogClient = readtable( 'NetAudioLogClient.txt', 'FileType', 'text', 'Delimiter', '\t' );
NetAudioLogBaseData = readtable( 'NetAudioLogBaseData.txt', 'FileType', 'text', 'Delimiter', '\t' );
blockSize = 32;
NetAudioLogNet = dir('NetAudioLogNet*.txt');
NetAudioLogNet = {NetAudioLogNet.name};
NetAudioLogNetTab = readtable(NetAudioLogNet{1}, 'FileType', 'text', 'Delimiter', '\t');
for k=2:numel(NetAudioLogNet)
temp = readtable(NetAudioLogNet{k}, 'FileType', 'text', 'Delimiter', '\t');
NetAudioLogNetTab = [NetAudioLogNetTab; temp];
end
NetAudioLogStream = dir('NetAudioLogStream*.txt');
NetAudioLogStream = {NetAudioLogStream.name};
NetAudioLogStreamTab = readtable(NetAudioLogStream{1}, 'FileType', 'text', 'Delimiter', '\t');
for k=2:numel(NetAudioLogStream)
temp = readtable(NetAudioLogStream{k}, 'FileType', 'text', 'Delimiter', '\t');
NetAudioLogStreamTab = [NetAudioLogStreamTab; temp];
end
NetAudioLogClient = dir('NetAudioLogClient*.txt');
NetAudioLogClient = {NetAudioLogClient.name};
NetAudioLogClientTab = readtable(NetAudioLogClient{1}, 'FileType', 'text', 'Delimiter', '\t');
for k=2:numel(NetAudioLogClient)
temp = readtable(NetAudioLogClient{k}, 'FileType', 'text', 'Delimiter', '\t');
NetAudioLogClientTab = [NetAudioLogClientTab; temp];
end
NetAudioLogBaseData = dir('NetAudioLogBaseData*.txt');
NetAudioLogBaseData = {NetAudioLogBaseData.name};
NetAudioLogBaseData = readtable(NetAudioLogBaseData{1}, 'FileType', 'text', 'Delimiter', '\t');
% Save Base Data
Channel = NetAudioLogBaseData.Channel(1);
......@@ -13,17 +35,17 @@ BufferSize = NetAudioLogBaseData.BufferSize(1);
RingBufferSize = NetAudioLogBaseData.RingBufferSize(1);
TargetSampleLatency = NetAudioLogBaseData.TargetSampleLatency(1);
minTime = min(NetAudioLogStream.WorldTimeStamp(1),NetAudioLogNet.WorldTimeStamp(1));
TimeNet = NetAudioLogNet.WorldTimeStamp - minTime;
TimeStream = NetAudioLogStream.WorldTimeStamp - minTime;
minTime = min(NetAudioLogStreamTab.WorldTimeStamp(1),NetAudioLogNetTab.WorldTimeStamp(1));
TimeNet = NetAudioLogNetTab.WorldTimeStamp - minTime;
TimeStream = NetAudioLogStreamTab.WorldTimeStamp - minTime;
TimeState = [TimeStream NetAudioLogStream.StreamingStatus];
TimeState = [TimeStream NetAudioLogStreamTab.StreamingStatus];
TimeUnderrun = TimeState(find(TimeState(:,2)==3), 1);
TimeOverrun = TimeState(find(TimeState(:,2)==4), 1);
TimeStream = TimeState(find(TimeState(:,2)==2), 1);
%% Plot Freie Smaples und Bufferstutus
Data = [NetAudioLogNet.WorldTimeStamp NetAudioLogNet.FreeSamples; NetAudioLogStream.WorldTimeStamp NetAudioLogStream.FreeSamples];
%% Plot Freie Smaples und Bufferstatus
Data = [NetAudioLogNetTab.WorldTimeStamp NetAudioLogNetTab.FreeSamples; NetAudioLogStreamTab.WorldTimeStamp NetAudioLogStreamTab.FreeSamples];
Data = sortrows(Data,1 );
Data(:,1) = Data(:,1) - minTime();
Data(:,2) = (Data(:,2)) / BufferSize;
......@@ -37,12 +59,12 @@ title(['Freie Bl
xlabel('Zeit in s')
ylabel('Anzahl der Blcke')
%% Plot Latenz
DiffTime = diff(NetAudioLogClient.WorldTimeStamp * 1000);
%% Calculate Latency
DiffTime = diff(NetAudioLogClientTab.WorldTimeStamp * 1000);
median = mean(DiffTime(:,1));
medianVec = zeros(size(DiffTime(:,1)));
medianVec = medianVec + median;
DiffTime = [NetAudioLogClient.WorldTimeStamp(2:end) - minTime DiffTime NetAudioLogClient.ProtocolStatus(2:end)];
DiffTime = [NetAudioLogClientTab.WorldTimeStamp(2:end) - minTime DiffTime NetAudioLogClientTab.ProtocolStatus(2:end)];
DiffTime = sortrows(DiffTime,3);
LatenzWaiting = DiffTime(find(DiffTime(:,3)<222), (1:2));
LatenzRunnning = DiffTime(find(DiffTime(:,3)>221), (1:2));
......@@ -53,20 +75,23 @@ sollLatenz = (BufferSize / SampleRate) * 1000;
sollLatenzVec = zeros(size(LatenzRunnning(:,1)));
sollLatenzVec = sollLatenzVec + sollLatenz;
%% Plot Latency
subplot(2,2,1:4)
plot( LatenzRunnning(:,1), LatenzRunnning(:,2), 'b.')
hold on
plot( LatenzRunnning(:,1), medianRunningVec, 'r')
plot( LatenzRunnning(:,1), sollLatenzVec, 'g')
plot( TimeUnderrun, zeros(size(TimeUnderrun)) + sollLatenz,'r*')
plot( TimeOverrun, zeros(size(TimeOverrun)) + medianRunning,'r*')
%plot( LatenzRunnning(:,1), medianRunningVec, 'r')
%plot( LatenzRunnning(:,1), sollLatenzVec, 'g')
%plot( TimeUnderrun, zeros(size(TimeUnderrun)) + sollLatenz,'r*')
%plot( TimeOverrun, zeros(size(TimeOverrun)) + medianRunning,'r*')
AnzahlUnderruns = size(TimeUnderrun);
AnzahlUnderruns = AnzahlUnderruns(1);
AnzahlUnderruns = num2str(AnzahlUnderruns);
RelativeUnderruns = 100 * size(TimeUnderrun) / size(TimeState);
Durchsatz = [num2str((32 * SampleRate * Channel)/1000) ' kbit/s']
Durchsatz = [num2str((32 * SampleRate * Channel)/1000) ' kbit/s'];
title(['Latenz pro Block (' num2str(BufferSize) ' Samples) bei ' num2str(Channel) ' Kanlen'])
legend('Latenz', ['Latenz (' num2str(medianRunning) ' ms)'], ['SollLatenz (' num2str(sollLatenz) ' ms)' ], ['Underruns (Anz. ' AnzahlUnderruns ' - ' num2str(RelativeUnderruns) '%)'], 'Overruns')
xlabel('Zeit in s')
ylabel('Latenz in ms')
legend('show')
name = ['Latency' num2str(BufferSize) ' ' num2str(RingBufferSize) ' - ' num2str(Channel)];
print(name,'-dsvg')
%% Einlesen der Logs
close all;
clear all;
ChannelVec = [1:20];
BlockSize = '256';
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
NetAudioLogStream = dir(['NetAudioLogStream_BS' BlockSize '*.txt']);
NetAudioLogStream = {NetAudioLogStream.name};
NetAudioLogStreamTab = readtable(NetAudioLogStream{1}, 'FileType', 'text', 'Delimiter', '\t');
for k=2:numel(NetAudioLogStream)
temp = readtable(NetAudioLogStream{k}, 'FileType', 'text', 'Delimiter', '\t');
NetAudioLogStreamTab = [NetAudioLogStreamTab; temp];
end
NetAudioLogBaseData = dir(['NetAudioLogBaseData_BS' BlockSize '*.txt']);
NetAudioLogBaseData = {NetAudioLogBaseData.name};
NetAudioLogBaseData = readtable(NetAudioLogBaseData{1}, 'FileType', 'text', 'Delimiter', '\t');
%% Berechne Underruns
TimeStream = NetAudioLogStreamTab.WorldTimeStamp - minTime;
TimeState = [TimeStream NetAudioLogStreamTab.StreamingStatus];
TimeUnderrun = TimeState(find(TimeState(:,2)==3), 1);
TimeUnderrun = sortrows(TimeUnderrun, 1);
%% Save Base Data
Channel = NetAudioLogBaseData.Channel(1);
SampleRate = NetAudioLogBaseData.Samplerate(1);
BufferSize = NetAudioLogBaseData.BufferSize(1);
RingBufferSize = NetAudioLogBaseData.RingBufferSize(1);
TargetSampleLatency = NetAudioLogBaseData.TargetSampleLatency(1);
%% Calculate Latency
DiffTime = diff(NetAudioLogClientTab.WorldTimeStamp * 1000);
DiffTime = [NetAudioLogClientTab.WorldTimeStamp(2:end) - minTime DiffTime NetAudioLogClientTab.ProtocolStatus(2:end) NetAudioLogClientTab.Channel(2:end)];
LatenzWaiting = DiffTime(find(DiffTime(:,3)==221), (1:4));
LatenzRunnning = DiffTime(find(DiffTime(:,3)==222), (1:4));
LatenzRunnning = sortrows(LatenzRunnning,1);
%% Plot Latency
subplot(3,2,1:4)
plotMean = ChannelVec;
AnzUnderrun = ChannelVec;
for k = ChannelVec
plotTime = LatenzRunnning(find(LatenzRunnning(:,4)==k), 1);
plotLatency = LatenzRunnning(find(LatenzRunnning(:,4)==k), 2);
plotChannel = LatenzRunnning(find(LatenzRunnning(:,4)==k), 4);
plotMean(k) = round(mean(plotLatency(2:end)),3);
underruns = TimeUnderrun < plotTime(end) & TimeUnderrun > plotTime(1);
AnzUnderrun(k) = sum(underruns);
plot(plotTime(2:end),plotLatency(2:end), '.')
hold on;
Llang{k} = [num2str(k) ' Ch (Mean: ' num2str(plotMean(k)) 'ms, Underruns: ' num2str(AnzUnderrun(k)) ')'];
Lkurz{k} = [num2str(k) ' Kanle'];
end
sollLatenz = (BufferSize / SampleRate) * 1000;
plot([0 maxTime-minTime],[sollLatenz sollLatenz], 'r')
plot(TimeUnderrun, sollLatenz, 'r*')
Llang{21} = ['Grenz Latenz (' num2str(sollLatenz) 'ms)'];
Llang{22} = ['Underruns'];
Lkurz{21} = ['Grenz Latenz'];
Lkurz{22} = ['Underruns'];
Durchsatz = [num2str((32 * SampleRate * Channel)/1000) ' kbit/s'];
title(['Latenz pro Block (' num2str(BufferSize) ' Samples)'])
xlabel('Zeit in s')
ylabel('Latenz in ms')
legend(Lkurz)
legend('show')
name = ['Latency' num2str(BufferSize) ' ' num2str(RingBufferSize) ' - ' num2str(Channel)];
%% Plot durchschnitsLatenz
subplot(3,2,5)
plot(ChannelVec, plotMean)
%ylim([0 1])
title(['Durchschnittliche Latenz bei x Kanlen'])
xlabel('Anzahl der Kanle')
ylabel('Latenz in ms')
%% Plot durchschnitsLatenz
subplot(3,2,6)
plot(ChannelVec, AnzUnderrun)
%ylim([0 700])
title(['Anzahl der Underruns bei x Kanlen'])
xlabel('Anzahl der Kanle')
ylabel('Anzahl der Underruns')
\ No newline at end of file
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