Commit 1990acf0 authored by sletz's avatar sletz
Browse files

Merge branch 'netone-fixes'

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3872 0c269be4-1314-0410-8aa9-9f06e86f4224
parents 2653c629 efd8eefc
......@@ -17,8 +17,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//#define HAVE_CELT 1
#ifdef WIN32
#include <malloc.h>
#endif
......
......@@ -42,6 +42,7 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $
#ifdef WIN32
#include <winsock.h>
#include <malloc.h>
#define socklen_t int
#else
#include <sys/socket.h>
#include <netinet/in.h>
......@@ -49,7 +50,7 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $
#include "netjack.h"
//#include "config.h"
#include "config.h"
#if HAVE_SAMPLERATE
#include <samplerate.h>
......@@ -92,7 +93,7 @@ int netjack_wait( netjack_driver_state_t *netj )
jacknet_packet_header *pkthdr;
if( !netj->next_deadline_valid ) {
netj->next_deadline = jack_get_time() + netj->deadline_offset;
netj->next_deadline = jack_get_time() + netj->period_usecs;
netj->next_deadline_valid = 1;
}
......@@ -174,23 +175,23 @@ int netjack_wait( netjack_driver_state_t *netj )
if( netj->deadline_goodness != MASTER_FREEWHEELS ) {
if( netj->deadline_goodness < want_deadline ) {
netj->deadline_offset -= netj->period_usecs/100;
netj->next_deadline -= netj->period_usecs/100;
//jack_log( "goodness: %d, Adjust deadline: --- %d\n", netj->deadline_goodness, (int) netj->period_usecs*netj->latency/100 );
}
if( netj->deadline_goodness > want_deadline ) {
netj->deadline_offset += netj->period_usecs/100;
netj->next_deadline += netj->period_usecs/100;
//jack_log( "goodness: %d, Adjust deadline: +++ %d\n", netj->deadline_goodness, (int) netj->period_usecs*netj->latency/100 );
}
}
if( netj->deadline_offset < (netj->period_usecs*70/100) ) {
jack_error( "master is forcing deadline_offset to below 70%% of period_usecs... increase latency setting on master" );
netj->deadline_offset = (netj->period_usecs*90/100);
}
// if( netj->next_deadline < (netj->period_usecs*70/100) ) {
// jack_error( "master is forcing deadline_offset to below 70%% of period_usecs... increase latency setting on master" );
// netj->deadline_offset = (netj->period_usecs*90/100);
// }
netj->next_deadline = jack_get_time() + netj->deadline_offset;
netj->next_deadline += netj->period_usecs;
} else {
netj->time_to_deadline = 0;
netj->next_deadline = jack_get_time() + netj->deadline_offset;
netj->next_deadline += netj->period_usecs;
// bah... the packet is not there.
// either
// - it got lost.
......@@ -581,7 +582,13 @@ netjack_startup( netjack_driver_state_t *netj )
struct sockaddr_in address;
// Now open the socket, and wait for the first packet to arrive...
netj->sockfd = socket (AF_INET, SOCK_DGRAM, 0);
#ifdef WIN32
u_long parm = 1;
DWORD bufsize = 262144;
//ioctlsocket( netj->sockfd, FIONBIO, &parm );
setsockopt( netj->sockfd, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof(bufsize) );
setsockopt( netj->sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&bufsize, sizeof(bufsize) );
if (netj->sockfd == INVALID_SOCKET)
#else
if (netj->sockfd == -1)
......
......@@ -26,7 +26,7 @@
*
*/
//#include "config.h"
#include "config.h"
#ifdef __APPLE__
#define _DARWIN_C_SOURCE
......@@ -52,6 +52,7 @@
#include <winsock2.h>
#define socklen_t int
#include <malloc.h>
#define socklen_t int
#else
#include <sys/socket.h>
#include <netinet/in.h>
......
......@@ -34,6 +34,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <string.h>
#include <signal.h>
#include "config.h"
#ifdef WIN32
#include <winsock2.h>
#define socklen_t int
......
......@@ -2,7 +2,7 @@
# encoding: utf-8
def configure(conf):
conf.check_cfg(package='alsa', atleast_version='1.0.0', args='--cflags --libs')
conf.check_cfg(package='alsa', atleast_version='1.0.18', args='--cflags --libs')
conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')
conf. check_cfg(package='libfreebob', atleast_version='1.0.0', args='--cflags --libs')
......
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