Commit 0ac64395 authored by moret's avatar moret
Browse files

Add network slow mode in netjack2 allowing full bandwidth use

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2779 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 032f2e3a
......@@ -501,11 +501,11 @@ namespace Jack
strcpy ( desc->params[i].long_desc, desc->params[i].short_desc );
i++;
strcpy ( desc->params[i].name, "fast_mode" );
desc->params[i].character = 'f';
desc->params[i].type = JackDriverParamString;
strcpy ( desc->params[i].value.str, "" );
strcpy ( desc->params[i].short_desc, "Fast mode allows a zero latency transmission." );
strcpy ( desc->params[i].name, "mode" );
desc->params[i].character = 'm';
desc->params[i].type = JackDriverParamChar;
desc->params[i].value.c = 'n';
strcpy ( desc->params[i].short_desc, "Fast (0 latency), Normal (1 cycle latency) or Slow (2 cycles latency)." );
strcpy ( desc->params[i].long_desc, desc->params[i].short_desc );
return desc;
......@@ -567,8 +567,8 @@ namespace Jack
case 't' :
transport_sync = param->value.ui;
break;
case 'f' :
network_mode = 'f';
case 'm' :
network_mode = param->value.c;
break;
}
}
......
This diff is collapsed.
......@@ -106,8 +106,8 @@ namespace Jack
{}
~JackNetSlaveInterface()
{
SocketAPIEnd();
}
SocketAPIEnd();
}
};
/**
......@@ -134,7 +134,7 @@ namespace Jack
JackNetMasterInterface() : fRunning ( false )
{}
JackNetMasterInterface ( session_params_t& params, JackNetSocket& socket, const char* multicast_ip )
: JackNetInterface ( params, socket, multicast_ip )
: JackNetInterface ( params, socket, multicast_ip )
{}
~JackNetMasterInterface()
{}
......
......@@ -377,7 +377,7 @@ namespace Jack
//fast mode, wait for the entire cycle duration
if ( params->fNetworkMode == 'f' )
time = 900000.f * ( static_cast<float> ( params->fPeriodSize ) / static_cast<float> ( params->fSampleRate ) );
//slow mode, just try recv during two subcycle audio packets
//normal or slow mode, short timeout on recv
else
time = 4000000.f * ( static_cast<float> ( params->fFramesPerPacket ) / static_cast<float> ( params->fSampleRate ) );
return socket->SetTimeOut ( static_cast<int> ( time ) );
......
......@@ -71,7 +71,7 @@ namespace Jack
uint32_t fFramesPerPacket; //complete frames per packet
uint32_t fBitdepth; //samples bitdepth (unused)
uint32_t fSlaveSyncMode; //is the slave in sync mode ?
char fNetworkMode; //fast or slow mode
char fNetworkMode; //fast, normal or slow mode
};
//net status **********************************************************************************
......
Supports Markdown
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