Commit e040bf80 authored by sletz's avatar sletz
Browse files

rebase from trunk 3550:3563

git-svn-id: http://subversion.jackaudio.org/jack/jack2/branches/libjacknet@3564 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 7ca13a6b
......@@ -23,42 +23,58 @@ Paul Davis
---------------------------
Jackdmp changes log
---------------------------
---------------------------
2009-06-19 Stephane Letz <letz@grame.fr>
* Correct JackTransportEngine::MakeAllLocating, sync callback has to be called in this case also.
2009-06-17 Stephane Letz <letz@grame.fr>
* Move DBus based audio device reservation code in ALSA backend compilation.
2009-06-16 Stephane Letz <letz@grame.fr>
* Correct JackFifo::TimedWait for EINTR handling.
2009-06-05 Stephane Letz <letz@grame.fr>
* Correct jack_set_error_function, jack_set_info_function and jack_set_thread_creator functions.
2009-05-18 Stephane Letz <letz@grame.fr>
* Correct wcsript files to create jackdbus only (and not create jackd anymore) when compiled in --dbus mode, add a --classic option. Both options are possible but issue a warning.
* Correct wcsript files to create jackdbus only (and not create jackd anymore) when compiled in --dbus mode, add a --classic option. Both options are possible but issue a warning.
2009-05-15 Stephane Letz <letz@grame.fr>
* Move InitFrameTime in JackDriver::Start method.
* Move InitFrameTime in JackDriver::Start method.
2009-05-13 Stephane Letz <letz@grame.fr>
* Reworked Torben Hohn fix for server restart issue on Windows.
* Reworked Torben Hohn fix for server restart issue on Windows.
2009-05-11 Stephane Letz <letz@grame.fr>
* New jack_free function added in jack.h.
* Torben Hohn fix for InitTime and GetMicroSeconds in JackWinTime.c.
* New jack_free function added in jack.h.
* Torben Hohn fix for InitTime and GetMicroSeconds in JackWinTime.c.
2009-05-07 Stephane Letz <letz@grame.fr>
* Cleanup "loopback" stuff in server.
* Cleanup "loopback" stuff in server.
2009-05-06 Stephane Letz <letz@grame.fr>
* Fix transport callback (timebase master, sync) issue when used after jack_activate (RT thread was not running).
* Fix transport callback (timebase master, sync) issue when used after jack_activate (RT thread was not running).
* D-Bus access for jackctl_server_add_slave/jackctl_server_remove_slave API.
2009-05-05 Stephane Letz <letz@grame.fr>
* First working version of native MIDI backend (JackCoreMidiDriver, JackWinMMEDriver).
2009-04-22 Stephane Letz <letz@grame.fr>
* jackctl_server_load_master renamed to jackctl_server_switch_master, jackctl_server_unload_master is removed.
2009-04-21 Stephane Letz <letz@grame.fr>
* Add jackctl_server_load_master/jackctl_server_unload_master API.
......
......@@ -278,12 +278,12 @@ static inline void WaitGraphChange()
EXPORT void jack_set_error_function (print_function func)
{
jack_error_callback = func;
jack_error_callback = (func == NULL) ? &default_jack_error_callback : func;
}
EXPORT void jack_set_info_function (print_function func)
{
jack_info_callback = func;
jack_info_callback = (func == NULL) ? &default_jack_info_callback : func;
}
EXPORT jack_client_t* jack_client_new(const char* client_name)
......@@ -1799,7 +1799,7 @@ EXPORT int jack_client_kill_thread(jack_client_t* client, pthread_t thread)
#ifndef WIN32
EXPORT void jack_set_thread_creator (jack_thread_creator_t jtc)
{
JackGlobals::fJackThreadCreator = jtc;
JackGlobals::fJackThreadCreator = (jtc == NULL) ? pthread_create : jtc;
}
#endif
......
......@@ -739,9 +739,10 @@ int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index)
int JackEngine::PortConnect(int refnum, const char* src, const char* dst)
{
jack_log("JackEngine::PortConnect src = %s dst = %s", src, dst);
AssertRefnum(refnum);
jack_port_id_t port_src, port_dst;
return (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0)
return (fGraphManager->GetTwoPorts(src, dst, &port_src, &port_dst) < 0)
? -1
: PortConnect(refnum, port_src, port_dst);
}
......@@ -788,14 +789,9 @@ int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst)
AssertRefnum(refnum);
jack_port_id_t port_src, port_dst;
if (fGraphManager->CheckPorts(src, dst, &port_src, &port_dst) < 0) {
return -1;
} else if (fGraphManager->Disconnect(port_src, port_dst) == 0) {
NotifyPortConnect(port_src, port_dst, false);
return 0;
} else {
return -1;
}
return (fGraphManager->GetTwoPorts(src, dst, &port_src, &port_dst) < 0)
? -1
: PortDisconnect(refnum, port_src, port_dst);
}
int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
......@@ -808,21 +804,23 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds
jack_int_t connections[CONNECTION_NUM_FOR_PORT];
fGraphManager->GetConnections(src, connections);
// Notifications
JackPort* port = fGraphManager->GetPort(src);
int ret = 0;
if (port->GetFlags() & JackPortIsOutput) {
for (int i = 0; (i < CONNECTION_NUM_FOR_PORT) && (connections[i] != EMPTY); i++) {
jack_log("NotifyPortConnect src = %ld dst = %ld false", src, connections[i]);
NotifyPortConnect(src, connections[i], false);
if (PortDisconnect(refnum, src, connections[i]) != 0) {
ret = -1;
}
}
} else {
for (int i = 0; (i < CONNECTION_NUM_FOR_PORT) && (connections[i] != EMPTY); i++) {
jack_log("NotifyPortConnect src = %ld dst = %ld false", connections[i], src);
NotifyPortConnect(connections[i], src, false);
if (PortDisconnect(refnum, connections[i], src) != 0) {
ret = -1;
}
}
}
return fGraphManager->DisconnectAll(src);
return ret;
} else if (fGraphManager->CheckPorts(src, dst) < 0) {
return -1;
} else if (fGraphManager->Disconnect(src, dst) == 0) {
......@@ -836,6 +834,7 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds
int JackEngine::PortRename(int refnum, jack_port_id_t port, const char* name)
{
AssertRefnum(refnum);
fGraphManager->GetPort(port)->SetName(name);
NotifyPortRename(port);
return 0;
......
......@@ -118,17 +118,23 @@ SERVER_EXPORT void jack_log(const char *fmt,...)
}
}
static void default_jack_error_callback(const char *desc)
SERVER_EXPORT void default_jack_error_callback(const char *desc)
{
fprintf(stderr, "%s\n", desc);
fflush(stderr);
}
static void default_jack_info_callback (const char *desc)
SERVER_EXPORT void default_jack_info_callback(const char *desc)
{
fprintf(stdout, "%s\n", desc);
fflush(stdout);
}
SERVER_EXPORT void silent_jack_error_callback(const char *desc)
{}
SERVER_EXPORT void silent_jack_info_callback(const char *desc)
{}
SERVER_EXPORT void (*jack_error_callback)(const char *desc) = &default_jack_error_callback;
SERVER_EXPORT void (*jack_info_callback)(const char *desc) = &default_jack_info_callback;
......@@ -45,6 +45,12 @@ extern "C"
SERVER_EXPORT extern void (*jack_error_callback)(const char *desc);
SERVER_EXPORT extern void (*jack_info_callback)(const char *desc);
SERVER_EXPORT extern void default_jack_error_callback(const char *desc);
SERVER_EXPORT extern void default_jack_info_callback(const char *desc);
SERVER_EXPORT extern void silent_jack_error_callback(const char *desc);
SERVER_EXPORT extern void silent_jack_info_callback(const char *desc);
typedef void (* jack_log_function_t)(int level, const char *message);
......@@ -52,8 +58,8 @@ extern "C"
void jack_log_function(int level, const char *message);
SERVER_EXPORT void set_threaded_log_function();
extern int jack_verbose;
extern int jack_verbose;
#ifdef __cplusplus
}
......
......@@ -627,7 +627,7 @@ int JackGraphManager::CheckPorts(jack_port_id_t port_src, jack_port_id_t port_ds
return 0;
}
int JackGraphManager::CheckPorts(const char* src_name, const char* dst_name, jack_port_id_t* port_src, jack_port_id_t* port_dst)
int JackGraphManager::GetTwoPorts(const char* src_name, const char* dst_name, jack_port_id_t* port_src, jack_port_id_t* port_dst)
{
jack_log("JackGraphManager::CheckConnect src_name = %s dst_name = %s", src_name, dst_name);
......@@ -641,7 +641,7 @@ int JackGraphManager::CheckPorts(const char* src_name, const char* dst_name, jac
return -1;
}
return CheckPorts(*port_src, *port_dst);
return 0;
}
// Client : port array
......
......@@ -91,7 +91,7 @@ class SERVER_EXPORT JackGraphManager : public JackShmMem, public JackAtomicState
void GetConnections(jack_port_id_t port_index, jack_int_t* connections); // TODO
const char** GetPorts(const char* port_name_pattern, const char* type_name_pattern, unsigned long flags);
int CheckPorts(const char* src, const char* dst, jack_port_id_t* src_index, jack_port_id_t* dst_index);
int GetTwoPorts(const char* src, const char* dst, jack_port_id_t* src_index, jack_port_id_t* dst_index);
int CheckPorts(jack_port_id_t port_src, jack_port_id_t port_dst);
void DisconnectAllInput(jack_port_id_t port_index);
......
......@@ -141,6 +141,7 @@ void JackTransportEngine::MakeAllLocating(JackClientInterface** table)
if (client) {
JackClientControl* control = client->GetClientControl();
control->fTransportState = JackTransportStopped;
control->fTransportSync = true;
control->fTransportTimebase = true;
jack_log("MakeAllLocating ref = %ld", i);
}
......
/*
Copyright (C) 2009 Grame
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
Completed from Julien Pommier (PianoTeq : http://www.pianoteq.com/) code.
*/
#include "jack.h"
#include <math.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <cassert>
#include <iostream>
/* dynamically load libjack and forward all registered calls to libjack
(similar to what relaytool is trying to do, but more portably..)
*/
using std::cerr;
int libjack_is_present = 0; // public symbol, similar to what relaytool does.
static void *libjack_handle = 0;
static void __attribute__((constructor)) tryload_libjack()
{
if (getenv("SKIP_LIBJACK") == 0) { // just in case libjack is causing troubles..
libjack_handle = dlopen("libjack.so.0", RTLD_LAZY);
}
libjack_is_present = (libjack_handle != 0);
}
void *load_jack_function(const char *fn_name)
{
void *fn = 0;
if (!libjack_handle) {
std::cerr << "libjack not found, so do not try to load " << fn_name << " ffs !\n";
return 0;
}
fn = dlsym(libjack_handle, fn_name);
if (!fn) {
std::cerr << "could not dlsym(" << libjack_handle << "), " << dlerror() << "\n";
}
return fn;
}
#define DECL_FUNCTION(return_type, fn_name, arguments_types, arguments) \
typedef return_type (*fn_name##_ptr_t)arguments_types; \
return_type fn_name arguments_types { \
static fn_name##_ptr_t fn = 0; \
if (fn == 0) { fn = (fn_name##_ptr_t)load_jack_function(#fn_name); } \
if (fn) return (*fn)arguments; \
else return 0; \
}
#define DECL_VOID_FUNCTION(fn_name, arguments_types, arguments) \
typedef void (*fn_name##_ptr_t)arguments_types; \
void fn_name arguments_types { \
static fn_name##_ptr_t fn = 0; \
if (fn == 0) { fn = (fn_name##_ptr_t)load_jack_function(#fn_name); } \
if (fn) (*fn)arguments; \
}
DECL_VOID_FUNCTION(jack_get_version, (int *major_ptr, int *minor_ptr, int *micro_ptr, int *proto_ptr), (major_ptr, minor_ptr, micro_ptr, proto_ptr));
DECL_FUNCTION(const char *, jack_get_version_string, (), ());
DECL_FUNCTION(jack_client_t *, jack_client_open, (const char *client_name, jack_options_t options, jack_status_t *status, ...),
(client_name, options, status));
DECL_FUNCTION(int, jack_client_close, (jack_client_t *client), (client));
DECL_FUNCTION(int, jack_client_new, (const char *client_name), (client_name));
DECL_FUNCTION(int, jack_client_name_size, (), ());
DECL_FUNCTION(char*, jack_get_client_name, (jack_client_t *client), (client));
DECL_FUNCTION(int, jack_internal_client_new, (const char *client_name,
const char *load_name,
const char *load_init), (client_name, load_name, load_init));
DECL_VOID_FUNCTION(jack_internal_client_close, (const char *client_name), (client_name));
DECL_FUNCTION(int, jack_is_realtime, (jack_client_t *client), (client));
DECL_VOID_FUNCTION(jack_on_shutdown, (jack_client_t *client, JackShutdownCallback shutdown_callback, void *arg), (client, function, arg));
DECL_FUNCTION(int, jack_set_process_callback, (jack_client_t *client,
JackProcessCallback process_callback,
void *arg), (client, process_callback, arg));
DECL_FUNCTION(jack_nframes_t, jack_thread_wait, (jack_client_t *client, int status), (client, status));
//
DECL_FUNCTION(jack_nframes_t, jack_cycle_wait, (jack_client_t *client), (client));
DECL_VOID_FUNCTION(jack_cycle_signal, (jack_client_t *client, , int status), (client, status));
DECL_FUNCTION(int, jack_set_process_thread, (jack_client_t *client,
JackThreadCallback fun,
void *arg), (client, fun, arg));
DECL_FUNCTION(int, jack_set_thread_init_callback, (jack_client_t *client,
JackThreadInitCallback thread_init_callback,
void *arg), (client, thread_init_callback, arg));
DECL_FUNCTION(int, jack_set_freewheel_callback, (jack_client_t *client,
JackFreewheelCallback freewheel_callback,
void *arg), (client, freewheel_callback, arg));
DECL_FUNCTION(int, jack_set_freewheel, (jack_client_t *client, int onoff), (client, onoff));
DECL_FUNCTION(int, jack_set_buffer_size, (jack_client_t *client, jack_nframes_t nframes), (client, nframes));
DECL_FUNCTION(int, jack_set_buffer_size_callback, (jack_client_t *client,
JackBufferSizeCallback bufsize_callback,
void *arg), (client, bufsize_callback, arg));
DECL_FUNCTION(int, jack_set_sample_rate_callback, (jack_client_t *client,
JackSampleRateCallback srate_callback,
void *arg), (client, srate_callback, arg));
DECL_FUNCTION(int, jack_set_client_registration_callback, (jack_client_t *client,
JackClientRegistrationCallback registration_callback,
void *arg), (client, registration_callback, arg));
DECL_FUNCTION(int, jack_set_port_registration_callback, (jack_client_t *client,
JackPortRegistrationCallback registration_callback,
void *arg), (client, registration_callback, arg));
DECL_FUNCTION(int, jack_set_port_connect_callback, (jack_client_t *client,
JackPortConnectCallback connect_callback,
void *arg), (client, connect_callback, arg));
DECL_FUNCTION(int, jack_set_port_rename_callback, (jack_client_t *client,
JackPortRenameCallback rename_callback,
void *arg), (client, rename_callback, arg));
DECL_FUNCTION(int, jack_set_graph_order_callback, (jack_client_t *client,
JackGraphOrderCallback graph_callback,
void *arg), (client, graph_callback, arg));
DECL_FUNCTION(int, jack_set_xrun_callback, (jack_client_t *client,
JackXRunCallback xrun_callback,
void *arg), (client, xrun_callback, arg));
DECL_FUNCTION(int, jack_activate, (jack_client_t *client), (client));
DECL_FUNCTION(int, jack_deactivate, (jack_client_t *client), (client));
DECL_FUNCTION(jack_port_t *, jack_port_register, (jack_client_t *client, const char *port_name, const char *port_type,
unsigned long flags, unsigned long buffer_size),
(client, port_name, port_type, flags, buffer_size));
DECL_FUNCTION(int, jack_port_unregister, (jack_client_t *client, jack_port_t* port), (client, port));
DECL_FUNCTION(void *, jack_port_get_buffer, (jack_port_t *port, jack_nframes_t nframes), (port, nframes));
DECL_FUNCTION(const char*, jack_port_name, (const jack_port_t *port), (port));
DECL_FUNCTION(const char*, jack_port_short_name, (const jack_port_t *port), (port));
DECL_FUNCTION(int, jack_port_flags, (const jack_port_t *port), (port));
DECL_FUNCTION(const char*, jack_port_type, (const jack_port_t *port), (port));
DECL_FUNCTION(jack_port_type_id_t, jack_port_type_id, (const jack_port_t *port), (port));
DECL_FUNCTION(int, jack_port_is_mine, (const jack_client_t *client, const jack_port_t* port), (client, port));
DECL_FUNCTION(int, jack_port_connected, (const jack_port_t *port), (port));
DECL_FUNCTION(int, jack_port_connected_to, (const jack_port_t *port, const char *port_name), (port, port_name));
DECL_FUNCTION(const char**, jack_port_get_connections, (const jack_port_t *port), (port));
DECL_FUNCTION(const char**, jack_port_get_all_connections, (const jack_port_t *port), (port));
DECL_FUNCTION(int, jack_port_tie, (jack_port_t *src, jack_port_t *dst), (src, dst));
DECL_FUNCTION(int, jack_port_untie, (jack_port_t *port), (port));
DECL_FUNCTION(jack_nframes_t, jack_get_buffer_size, (jack_client_t *client), (client));
DECL_FUNCTION(jack_nframes_t, jack_get_sample_rate, (jack_client_t *client), (client));
DECL_FUNCTION(jack_nframes_t, jack_port_get_total_latency, (jack_client_t *client, jack_port_t *port), (client, port));
DECL_VOID_FUNCTION(jack_set_error_function, (void (*func)(const char *)), (func));
DECL_FUNCTION(const char**, jack_get_ports, (jack_client_t *client, const char *port_name_pattern, const char * type_name_pattern,
unsigned long flags), (client, port_name_pattern, type_name_pattern, flags));
DECL_FUNCTION(int, jack_connect, (jack_client_t *client, const char *source_port, const char *destination_port), (client, source_port, destination_port));
DECL_FUNCTION(int, jack_set_port_connect_callback, (jack_client_t *client, JackPortConnectCallback connect_callback, void *arg),
(client, connect_callback, arg));
DECL_FUNCTION(jack_port_t *, jack_port_by_id, (jack_client_t *client, jack_port_id_t port_id), (client, port_id));
......@@ -76,9 +76,6 @@ static void notify_server_stop(const char* server_name)
#endif
static void silent_jack_error_callback(const char *desc)
{}
static void copyright(FILE* file)
{
fprintf(file, "jackdmp " VERSION "\n"
......@@ -208,7 +205,7 @@ int main(int argc, char* argv[])
jackctl_parameter_t* param;
union jackctl_parameter_value value;
copyright(stdout);
copyright(stdout);
server_ctl = jackctl_server_create();
if (server_ctl == NULL) {
......@@ -359,10 +356,10 @@ int main(int argc, char* argv[])
if (show_version) {
printf( "jackdmp version " VERSION
" tmpdir " jack_server_dir
" protocol %d"
"\n", JACK_PROTOCOL_VERSION);
return -1;
" tmpdir " jack_server_dir
" protocol %d"
"\n", JACK_PROTOCOL_VERSION);
return -1;
}
if (!seen_audio_driver) {
......
......@@ -1047,6 +1047,7 @@ extern void (*jack_error_callback)(const char *msg);
/**
* Set the @ref jack_error_callback for error message display.
* Set it to NULL to restore default_jack_error_callback function.
*
* The JACK library provides two built-in callbacks for this purpose:
* default_jack_error_callback() and silent_jack_error_callback().
......@@ -1065,6 +1066,10 @@ extern void (*jack_info_callback)(const char *msg);
/**
* Set the @ref jack_info_callback for info message display.
* Set it to NULL to restore default_jack_info_callback function.
*
* The JACK library provides two built-in callbacks for this purpose:
* default_jack_info_callback() and silent_jack_info_callback().
*/
void jack_set_info_function (void (*func)(const char *));
......
......@@ -116,8 +116,8 @@ int jack_client_stop_thread(jack_client_t* client, pthread_t thread);
* @returns 0, if successful; otherwise an error number.
*/
int jack_client_kill_thread(jack_client_t* client, pthread_t thread);
#ifndef WIN32
#ifndef WIN32
typedef int (*jack_thread_creator_t)(pthread_t*,
const pthread_attr_t*,
......@@ -137,11 +137,13 @@ int jack_client_stop_thread(jack_client_t* client, pthread_t thread);
* that all threads that might call win32 functions are known
* to Wine.
*
* Set it to NULL to restore thread creation function.
*
* @param creator a function that creates a new thread
*
*/
void jack_set_thread_creator (jack_thread_creator_t creator);
void jack_set_thread_creator (jack_thread_creator_t creator);
#endif
/* @} */
......
......@@ -141,9 +141,6 @@ def build(bld):
'../posix/JackSocketServerNotifyChannel.cpp',
'../posix/JackNetUnixSocket.cpp',
]
if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']:
serverlib.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c']
if bld.env['IS_SUN']:
serverlib.source += [
......
......@@ -1352,14 +1352,14 @@ jack_controller_dbus_disconnect_ports_by_id(
if (port1_ptr == NULL)
{
jack_dbus_error(call, JACK_DBUS_ERROR_INVALID_ARGS, "cannot find port %" PRIu64, port1_id);
return;
goto unlock;
}
port2_ptr = jack_controller_patchbay_find_port_by_id(patchbay_ptr, port2_id);
if (port2_ptr == NULL)
{
jack_dbus_error(call, JACK_DBUS_ERROR_INVALID_ARGS, "cannot find port %" PRIu64, port2_id);
return;
goto unlock;
}
if (!jack_controller_patchbay_disconnect(
......
......@@ -36,18 +36,24 @@ def build(bld):
jackd.target = 'jackd'
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
alsa_driver_src = ['alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
'alsa/alsa_midi_jackmp.cpp',
'../common/memops.c',
'alsa/generic_hw.c',
'alsa/hdsp.c',
'alsa/hammerfall.c',
'alsa/ice1712.c'
]
if bld.env['BUILD_JACKDBUS']:
alsa_driver_src += ['../dbus/reserve.c', '../dbus/audio_reserve.c']
if bld.env['BUILD_DRIVER_ALSA'] == True:
create_jack_driver_obj(bld, 'alsa', ['alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
'alsa/alsa_midi_jackmp.cpp',
'../common/memops.c',
'alsa/generic_hw.c',
'alsa/hdsp.c',
'alsa/hammerfall.c',
'alsa/ice1712.c'
], "ALSA")
create_jack_driver_obj(bld, 'alsa', alsa_driver_src, "ALSA")
if bld.env['BUILD_DRIVER_FREEBOB'] == True:
create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB")
......
......@@ -101,12 +101,16 @@ bool JackFifo::TimedWait(long usec)
// Does not work on OSX ??
bool JackFifo::TimedWait(long usec)
{
assert(fFifo >= 0);
if ((poll(&fPoll, 1, usec / 1000) < 0) && (errno != EINTR)) {
jack_error("JackFifo::TimedWait name = %s err = %s", fName, strerror(errno));
int res;
if (fFifo < 0) {
jack_error("JackFifo::TimedWait name = %s already desallocated!!", fName);
return false;
}
do {
res = poll(&fPoll, 1, usec / 1000);
} while (res < 0 && errno == EINTR);
if (fPoll.revents & POLLIN) {
return Wait();
......
......@@ -27,6 +27,8 @@ Copyright (C) 2004-2006 Grame
namespace Jack
{
class JackServer;
class JackClientPipeThread : public JackRunnableInterface
{
......
......@@ -61,15 +61,13 @@ def set_options(opt):
opt.tool_options('compiler_cc')
opt.add_option('--libdir', type='string', help="Library directory [Default: <prefix>/lib]")