git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3873 0c269be4-1314-0410-8aa9-9f06e86f4224tags/v1.9.5
@@ -49,8 +49,10 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $ | |||||
#endif | #endif | ||||
#include "netjack.h" | #include "netjack.h" | ||||
#include "config.h" | |||||
#ifndef WIN32 | |||||
#include "config.h" | |||||
#endif | |||||
#if HAVE_SAMPLERATE | #if HAVE_SAMPLERATE | ||||
#include <samplerate.h> | #include <samplerate.h> | ||||
@@ -166,7 +168,7 @@ int netjack_wait( netjack_driver_state_t *netj ) | |||||
netj->packet_data_valid = 1; | netj->packet_data_valid = 1; | ||||
int want_deadline; | int want_deadline; | ||||
if( netj->jitter_val != 0 ) | |||||
if( netj->jitter_val != 0 ) | |||||
want_deadline = netj->jitter_val; | want_deadline = netj->jitter_val; | ||||
else if( netj->latency < 4 ) | else if( netj->latency < 4 ) | ||||
want_deadline = -netj->period_usecs/2; | want_deadline = -netj->period_usecs/2; | ||||
@@ -712,7 +714,7 @@ netjack_startup( netjack_driver_state_t *netj ) | |||||
netj->period_usecs = | netj->period_usecs = | ||||
(jack_time_t) floor ((((float) netj->period_size) / (float)netj->sample_rate) | (jack_time_t) floor ((((float) netj->period_size) / (float)netj->sample_rate) | ||||
* 1000000.0f); | * 1000000.0f); | ||||
if( netj->latency == 0 ) | if( netj->latency == 0 ) | ||||
netj->deadline_offset = 50*netj->period_usecs; | netj->deadline_offset = 50*netj->period_usecs; | ||||
else | else | ||||
@@ -723,7 +725,7 @@ netjack_startup( netjack_driver_state_t *netj ) | |||||
// TODO: this is a hack. But i dont want to change the packet header. | // TODO: this is a hack. But i dont want to change the packet header. | ||||
netj->resample_factor = (netj->resample_factor * netj->period_size * 1024 / netj->sample_rate / 8)&(~1); | netj->resample_factor = (netj->resample_factor * netj->period_size * 1024 / netj->sample_rate / 8)&(~1); | ||||
netj->resample_factor_up = (netj->resample_factor_up * netj->period_size * 1024 / netj->sample_rate / 8)&(~1); | netj->resample_factor_up = (netj->resample_factor_up * netj->period_size * 1024 / netj->sample_rate / 8)&(~1); | ||||
netj->net_period_down = netj->resample_factor; | netj->net_period_down = netj->resample_factor; | ||||
netj->net_period_up = netj->resample_factor_up; | netj->net_period_up = netj->resample_factor_up; | ||||
} else { | } else { | ||||
@@ -25,8 +25,10 @@ | |||||
* $Id: net_driver.c,v 1.16 2006/03/20 19:41:37 torbenh Exp $ | * $Id: net_driver.c,v 1.16 2006/03/20 19:41:37 torbenh Exp $ | ||||
* | * | ||||
*/ | */ | ||||
#include "config.h" | |||||
#ifndef WIN32 | |||||
#include "config.h" | |||||
#endif | |||||
#ifdef __APPLE__ | #ifdef __APPLE__ | ||||
#define _DARWIN_C_SOURCE | #define _DARWIN_C_SOURCE | ||||
@@ -128,7 +130,7 @@ int get_sample_size (int bitdepth) | |||||
if (bitdepth == 16) | if (bitdepth == 16) | ||||
return sizeof (int16_t); | return sizeof (int16_t); | ||||
//JN: why? is this for buffer sizes before or after encoding? | //JN: why? is this for buffer sizes before or after encoding? | ||||
//JN: if the former, why not int16_t, if the latter, shouldn't it depend on -c N? | |||||
//JN: if the former, why not int16_t, if the latter, shouldn't it depend on -c N? | |||||
if( bitdepth == CELT_MODE ) | if( bitdepth == CELT_MODE ) | ||||
return sizeof( unsigned char ); | return sizeof( unsigned char ); | ||||
return sizeof (int32_t); | return sizeof (int32_t); | ||||
@@ -33,8 +33,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <signal.h> | #include <signal.h> | ||||
#include "config.h" | |||||
#ifndef WIN32 | |||||
#include "config.h" | |||||
#endif | |||||
#ifdef WIN32 | #ifdef WIN32 | ||||
#include <winsock2.h> | #include <winsock2.h> | ||||
@@ -756,7 +758,7 @@ main (int argc, char *argv[]) | |||||
if (statecopy_netxruns != state_netxruns) { | if (statecopy_netxruns != state_netxruns) { | ||||
statecopy_netxruns = state_netxruns; | statecopy_netxruns = state_netxruns; | ||||
printf ("%s: at frame %06d -> total netxruns %d (%d%%) queue time= %d\n", | printf ("%s: at frame %06d -> total netxruns %d (%d%%) queue time= %d\n", | ||||
client_name, | |||||
client_name, | |||||
state_currentframe, | state_currentframe, | ||||
statecopy_netxruns, | statecopy_netxruns, | ||||
100*statecopy_netxruns/state_currentframe, | 100*statecopy_netxruns/state_currentframe, | ||||