Commit 910fd826 authored by sletz's avatar sletz
Browse files

Compiles in Windows again.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3873 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 1990acf0
......@@ -49,8 +49,10 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $
#endif
#include "netjack.h"
#include "config.h"
#ifndef WIN32
#include "config.h"
#endif
#if HAVE_SAMPLERATE
#include <samplerate.h>
......@@ -166,7 +168,7 @@ int netjack_wait( netjack_driver_state_t *netj )
netj->packet_data_valid = 1;
int want_deadline;
if( netj->jitter_val != 0 )
if( netj->jitter_val != 0 )
want_deadline = netj->jitter_val;
else if( netj->latency < 4 )
want_deadline = -netj->period_usecs/2;
......@@ -712,7 +714,7 @@ netjack_startup( netjack_driver_state_t *netj )
netj->period_usecs =
(jack_time_t) floor ((((float) netj->period_size) / (float)netj->sample_rate)
* 1000000.0f);
if( netj->latency == 0 )
netj->deadline_offset = 50*netj->period_usecs;
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.
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->net_period_down = netj->resample_factor;
netj->net_period_up = netj->resample_factor_up;
} else {
......
......@@ -25,8 +25,10 @@
* $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__
#define _DARWIN_C_SOURCE
......@@ -128,7 +130,7 @@ int get_sample_size (int bitdepth)
if (bitdepth == 16)
return sizeof (int16_t);
//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 )
return sizeof( unsigned char );
return sizeof (int32_t);
......
......@@ -33,8 +33,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "config.h"
#ifndef WIN32
#include "config.h"
#endif
#ifdef WIN32
#include <winsock2.h>
......@@ -756,7 +758,7 @@ main (int argc, char *argv[])
if (statecopy_netxruns != state_netxruns) {
statecopy_netxruns = state_netxruns;
printf ("%s: at frame %06d -> total netxruns %d (%d%%) queue time= %d\n",
client_name,
client_name,
state_currentframe,
statecopy_netxruns,
100*statecopy_netxruns/state_currentframe,
......
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