From 5917a2c76b8d5172ff87b82b5dcc4afbd65a3779 Mon Sep 17 00:00:00 2001 From: sletz Date: Tue, 13 May 2008 12:49:46 +0000 Subject: [PATCH] Allows wrapper library to log in a file (using JACK_WRAPPER_DEBUG=file). git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2255 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 770 +++++++++++++++++++------------------- common/JackAPIWrapper.cpp | 47 ++- 2 files changed, 427 insertions(+), 390 deletions(-) diff --git a/ChangeLog b/ChangeLog index 546f5dca..f3807d18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,25 +1,29 @@ ---------------------------- - Contributors ---------------------------- - -Dmitry Baikov -Steven Chamberlain -Thom Johansen -Thibault LeMeur -Pieter Palmers -Tom Szilagyi +--------------------------- + Contributors +--------------------------- + +Dmitry Baikov +Steven Chamberlain +Thom Johansen +Thibault LeMeur +Pieter Palmers +Tom Szilagyi Andrzej Szombierski Kjetil S.Matheussen Pieter Palmers Tim Blechmann Marc-Olivier Barre Nedko Arnaudov -Fernando Lopez-Lezcano - ---------------------------- - Jackdmp changes log +Fernando Lopez-Lezcano + +--------------------------- + Jackdmp changes log --------------------------- +2008-05-12 Stephane Letz + + * Allows wrapper library to log in a file (using JACK_WRAPPER_DEBUG=file). + 2008-05-09 Stephane Letz * Mike Taht's fix for proper alsa xrun duration measurement. @@ -239,429 +243,429 @@ Fernando Lopez-Lezcano * Implement jack_recompute_total_latency and jack_recompute_total_latencies. * Remove fBufferSize field in JackGraphManager object. - * Port connection callback, client side. + * Port connection callback, client side. 2008-01-28 Stephane Letz * Updated API to match jack 0.109.0 version (in progress). Correct checking thread in CoreAudio driver. * Port connection callback, server side. - * Cleanup jack_port_connected_to implementation. + * Cleanup jack_port_connected_to implementation. 2008-01-25 Stephane Letz - * OSX 32/64 bits version. + * OSX 32/64 bits version. 2008-01-24 Stephane Letz - * CoreAudio driver improvement: detect and notify abnormal situations (stopped driver in case of SR change...). + * CoreAudio driver improvement: detect and notify abnormal situations (stopped driver in case of SR change...). 2008-01-03 Stephane Letz - * Dmitry Baikov MIDI patch : alsa_seqmidi and alsa_rammidi drivers. + * Dmitry Baikov MIDI patch : alsa_seqmidi and alsa_rammidi drivers. 2008-01-03 Stephane Letz - * Tim Blechmann patch for JackGraphManager::GetPortsAux memory leak, Tim Blechmann patch for scons install. + * Tim Blechmann patch for JackGraphManager::GetPortsAux memory leak, Tim Blechmann patch for scons install. 2007-12-12 Stephane Letz - * Cleanup in CoreAudio driver. + * Cleanup in CoreAudio driver. 2007-12-11 Stephane Letz - * Change string management for proper compilation with gcc 4.2.2. JackLog cleanup. + * Change string management for proper compilation with gcc 4.2.2. JackLog cleanup. 2007-12-08 Stephane Letz - * Tim Blechmann scons patch. + * Tim Blechmann scons patch. 2007-12-07 Stephane Letz - * Pieter Palmers second new build system: scons and Makefile based build. + * Pieter Palmers second new build system: scons and Makefile based build. 2007-12-06 Stephane Letz - * Pieter Palmers FFADO driver and scons based build. + * Pieter Palmers FFADO driver and scons based build. 2007-12-05 Stephane Letz - * Correct sample_rate management in JackCoreAudioDriver::Open. Better handling in sample_rate change listener. + * Correct sample_rate management in JackCoreAudioDriver::Open. Better handling in sample_rate change listener. 2007-12-04 Stephane Letz - * Add a sample_rate change listener in CoreAudio driver. + * Add a sample_rate change listener in CoreAudio driver. 2007-12-03 Stephane Letz - * Correct bug in CoreAudio driver sample rate management. + * Correct bug in CoreAudio driver sample rate management. 2007-11-30 Stephane Letz - * Correct JackMachNotifyChannel::ClientNotify. + * Correct JackMachNotifyChannel::ClientNotify. 2007-11-29 Stephane Letz - * Correct fPeriodUsecs computation in JackAudioDriver::SetBufferSize and JackAudioDriver::SetSampleRate. + * Correct fPeriodUsecs computation in JackAudioDriver::SetBufferSize and JackAudioDriver::SetSampleRate. 2007-11-28 Stephane Letz - * On OSX, use jack server name in notification system. + * On OSX, use jack server name in notification system. + +2007-11-21 Stephane Letz -2007-11-21 Stephane Letz - * On OSX, use CFNotificationCenterPostNotificationWithOptions with kCFNotificationDeliverImmediately | kCFNotificationPostToAllSessions for server ==> JackRouter plugin notification. -2007-11-20 Stephane Letz - +2007-11-20 Stephane Letz + * Correct CheckPort in JackAPI.cpp. -2007-11-15 Stephane Letz - +2007-11-15 Stephane Letz + * Move OSX start/stop notification mechanism in Jackdmp.cpp. - -2007-11-05 Stephane Letz - + +2007-11-05 Stephane Letz + * Use of JackWinSemaphore instead of JackWinEvent for inter-process synchronization. - * Correct types.h for use with MINGW on Windows. - -2007-11-04 Stephane Letz - - * Add an implementation for obsolete jack_internal_client_new and jack_internal_client_close. Add missing jack_port_type_size. - -2007-11-02 Stephane Letz - - * Correct ALSA driver Attach method: internal driver may have changed the buffer_size and sample_rate values. - * Add JackWinSemaphore class. - -2007-10-01 Stephane Letz - - * Server and user directory related code moved in a JackTools file. - * Client name rewritting to remove path characters (used in fifo naming). - -2007-10-30 Stephane Letz - - * Fix a bug in freewheel management in async mode: drivers now receive the kStartFreewheelCallback and kStopFreewheelCallback notifications. - -2007-10-26 Stephane Letz - - * Add midiseq and midisine examples. - * Cleanup old zombification code. - * Linux Makefile now install jack headers. - * Use of JACK_CLIENT_DEBUG environment variable to activate debug client mode. - * Definition of JACK_LOCATION variable using -D in the Makefile. - * Restore jack 0.103.0 MIDI API version. - -2007-10-25 Stephane Letz - - * Merge of Dmitry Baikov MIDI branch. - * Correct JackGraphManager::GetPortsAux to use port type. - * Remove JackEngineTiming class: code moved in JackEngineControl. - -2007-10-24 Stephane Letz - - * Implementation of server_name setting (-n). - -2007-10-23 Stephane Letz - - * Correct jack_acquire_real_time_scheduling on OSX. - -2007-10-18 Stephane Letz - - * Use LIB_DIR variable for 64 bits related compilation (drivers location). More generic Linux script. - -2007-10-16 Stephane Letz - - * Reorganize jack headers. Improve Linux install/remove scripts. - -2007-10-16 Stephane Letz - - * Internal loadable client implementation, winpipe version added. - -2007-10-12 Stephane Letz - - * Internal loadable client implementation, socket version added. - * Fix JackEngine::Close() method. - -2007-10-11 Stephane Letz - - * Internal loadable client implementation (in progress). - -2007-10-08 Stephane Letz - - * Use .jackdrc file (instead of .jackdmprc). Install script now creates a link "jackd ==> jackdmp" so that automatic launch can work correctly. - * Paul Davis patch for -r (--replace-registry) feature. - -2007-10-07 Stephane Letz - - * Add missing timestamps.c and timestamps.h files. Correctly export public headers in OSX frameworks. Suppress JackEngine::ClientInternalCloseIm method. - -2007-10-04 Stephane Letz - - * Correct "jack_register_server" in shm.c. - -2007-10-04 Stephane Letz - - * Fix a resource leak issue in JackCoreAudioDriver::Close(). Better implement "jack_client_open" when linking a client with the server library. - -2007-10-03 Stephane Letz - - * Rename server_name from "default" to "jackdmp_default" to avoid conflict with regular jackd server. - -2007-10-02 Stephane Letz - - * Correct jack_client_open "status" management. - -2007-08-27 Stephane Letz - - * Server/library protocol checking implementation. - -2007-08-26 Stephane Letz - - * Make "Rename" a method of JackPort class, call it from driver Attach method. - -2007-08-24 Stephane Letz - - * Implement server temporary (-T) mode. - -2007-08-23 Stephane Letz - - * Fix a bug in jack_test. Correct JackShmMem destructor. Correct end case in JackClient::Execute. Correct JackMachSemaphore::Disconnect. - -2007-08-22 Stephane Letz - - * Fix a bug in JackLibClient::Open introduced when adding automatic client renaming. - -2007-08-21 Stephane Letz - - * Fix backend port alias management (renaming in system:xxx). - -2007-08-20 Stephane Letz - - * Automatic server launch. Removes unneeded 'volatile' for JackTransportEngine::fWriteCounter. - -2007-08-19 Stephane Letz - - * Add "systemic" latencies management in CoreAudio driver. - -2007-08-16 Stephane Letz - - * Automatic client renaming. - -2007-07-27 Stephane Letz - - * Correct JackEngine::ClientCloseAux (when called from JackEngine::ClientExternalOpen). Correct JackWinEvent::Allocate. - -2007-07-20 Stephane Letz - - * Correct notification for kActivateClient event. - -2007-06-11 Stephane Letz - - * Dmitry Baikov buffer size patch. - -2007-06-10 Stephane Letz - - * Correct deprecated jack_set_sample_rate_callback to return 0 instead of -1. - -2007-06-09 Stephane Letz - - * Checking in the server to avoid calling the clients if no callback are registered. - -2007-06-08 Stephane Letz - - * New JackNotication.h header in preparation for callback checking in the server. - -2007-05-29 Stephane Letz - - * Add "callback exiting" and "jack_frame_time" tests in jack_test. - -2007-05-09 Stephane Letz - - * Add a mutex in JackGraphManager AllocatePort/ReleasePort methods. - -2007-05-05 Stephane Letz - - * Add jack_set_client_registration_callback API. - -2007-05-04 Stephane Letz - - * Steven Chamberlain patch to fix jack_port_type. Test for jack_port_type behaviour in jack_test.cpp tool. - -2007-05-03 Stephane Letz - - * Steven Chamberlain patch to fix jack_port_by_id export. - -2007-04-28 Stephane Letz - - * Add new jack_port_set_alias, jack_port_unset_alias and jack_port_get_aliases API. - -2007-04-27 Stephane Letz - - * Add missing -D__SMP__in OSX project. - -2007-04-23 Stephane Letz - - * Dmitry Baikov jackmp-time patch: add jack_get_time, jack_time_to_frames, jack_frames_to_time. - -2007-04-03 Stephane Letz - - * Dmitry Baikov remove-nframes patch. - -2007-04-02 Stephane Letz - - * Dmitry Baikov lost-event patch. - -2007-04-01 Stephane Letz - - * Merge JackGraphManager Remove and Release method in a unique Release method. - -2007-03-12 Stephane Letz - - * Bug fix in JackMidiBuffer::MaxEventSize(). - -2007-03-09 Stephane Letz - - * Dmitry Baikov MIDI patch phase 2. - -2007-03-08 Stephane Letz - - * Dmitry Baikov jackmp-port-clear patch. - -2007-03-06 Stephane Letz - - * Dmitry Baikov MIDI patch phase 1. - -2007-03-04 Stephane Letz - - * Dmitry Baikov patch for JackGraphManager.cpp. - * Dmitry Baikov MIDI patch phase 0. - -2007-02-19 Stephane Letz - - * Correct back JackAlsaDriver::Read method. - -2007-02-14 Stephane Letz - - * Better error checking in PortAudio driver. - -2007-02-07 Stephane Letz - - * Thom Johansen fix for port buffer alignment issues. - -2007-02-05 Stephane Letz - - * Add Pieter Palmers FreeBob driver. - * Thibault LeMeur ALSA driver patch. - -2007-01-31 Stephane Letz - - * Use pthread_attr_setstacksize in JackPosixThread class. - -2007-01-30 Stephane Letz - - * New LockAllMemory and UnlockAllMemory functions. - -2007-01-29 Stephane Letz - - * More robust activation/deactivation code, especially in case of client crash. - -2007-01-27 Stephane Letz - - * Uses a time out value of 10 sec in freewheel mode (like jack). - -2007-01-21 Stephane Letz - - * More client debug code: check if the client is still valid in every JackDebugClient method, check if the library context is still valid in every API call. - -2007-01-14 Stephane Letz - - * Implement thread.h API. - -2007-01-09 Stephane Letz - - * New server/client data transfer model to fix a 64 bits system bug. Fix a device name reversal bug in ALSA driver. - -2007-01-04 Stephane Letz - - * Add call to the init callback (set up using the jack_set_thread_init_callback API) in Real-Time and Notification threads. Define a new 'kActivateClient' notification. - -2007-01-02 Stephane Letz - - * Internal cleanup. - -2006-12-23 Stephane Letz - - * shared_ports renamed to shared_graph. - -2006-12-15 Stephane Letz - - * Move client refnum management in JackEngine. - -2006-12-12 Stephane Letz - - * Tom Szilagyi memory leak fix in ringbuffer.c. - -2006-11-29 Stephane Letz - - * Correct JackWinEnvent::Allocate (handle the ERROR_ALREADY_EXISTS case). Correct JackEngine::ClientExternalNew. - * Karsten Wiese correction for ALSA usx2y driver. - -2006-11-22 Stephane Letz - - * In synchronous mode, if the driver time out is reached, the server may get desynchronized (pending signal may arrive in later cycles), - improve audio driver synchronous code to better handle this case. - -2006-11-08 Stephane Letz - - * Synchronize ALSA backend with jack one. - -2006-11-04 Stephane Letz - - * Use -D to setup ADDON_DIR on OSX and Linux. - -2006-10-11 Stephane Letz - - * Correct server SetBufferSize in case of failure. Correct PortAudio driver help. - -2006-10-06 Stephane Letz - - * Add a new cpu testing/loading client. - -2006-09-23 Stephane Letz - - * Rename global "verbose" in "jack_verbose" to avoid symbol clash with PureData. - -2006-09-20 Stephane Letz - - * On Windows, avoid to use the unsafe Kill thread method. Use thread Stop instead and have blocked IO be unlocked. - * Still get RT thread termination problems, restore a version that works on OSX and Linux with conditionnal compilation for now. - -2006-09-16 Stephane Letz - - * Restore behaviour of LoopBack driver, which has to be opened in any case... - -2006-09-15 Stephane Letz - - * On Windows version, use signal to quit the server. - -2006-09-13 Stephane Letz - - * Correct pipe destruction bug in JackWinNamedPipe class. - -2006-09-11 Stephane Letz - - * Handling of LoopBack driver only when really needed. - * Correct crash bug when closing clients on Windows due to multi-threading synchronization issues. - -2006-09-06 Stephane Letz - - * Correct coreaudio driver (input was not working since 0.55 version). - * Version for 0.58 release. - -2006-09-04 Stephane Letz - - * Correct Windows VC++ projects. - -2006-09-03 Stephane Letz - - * First import of version 0.58 base code + * Correct types.h for use with MINGW on Windows. + +2007-11-04 Stephane Letz + + * Add an implementation for obsolete jack_internal_client_new and jack_internal_client_close. Add missing jack_port_type_size. + +2007-11-02 Stephane Letz + + * Correct ALSA driver Attach method: internal driver may have changed the buffer_size and sample_rate values. + * Add JackWinSemaphore class. + +2007-10-01 Stephane Letz + + * Server and user directory related code moved in a JackTools file. + * Client name rewritting to remove path characters (used in fifo naming). + +2007-10-30 Stephane Letz + + * Fix a bug in freewheel management in async mode: drivers now receive the kStartFreewheelCallback and kStopFreewheelCallback notifications. + +2007-10-26 Stephane Letz + + * Add midiseq and midisine examples. + * Cleanup old zombification code. + * Linux Makefile now install jack headers. + * Use of JACK_CLIENT_DEBUG environment variable to activate debug client mode. + * Definition of JACK_LOCATION variable using -D in the Makefile. + * Restore jack 0.103.0 MIDI API version. + +2007-10-25 Stephane Letz + + * Merge of Dmitry Baikov MIDI branch. + * Correct JackGraphManager::GetPortsAux to use port type. + * Remove JackEngineTiming class: code moved in JackEngineControl. + +2007-10-24 Stephane Letz + + * Implementation of server_name setting (-n). + +2007-10-23 Stephane Letz + + * Correct jack_acquire_real_time_scheduling on OSX. + +2007-10-18 Stephane Letz + + * Use LIB_DIR variable for 64 bits related compilation (drivers location). More generic Linux script. + +2007-10-16 Stephane Letz + + * Reorganize jack headers. Improve Linux install/remove scripts. + +2007-10-16 Stephane Letz + + * Internal loadable client implementation, winpipe version added. + +2007-10-12 Stephane Letz + + * Internal loadable client implementation, socket version added. + * Fix JackEngine::Close() method. + +2007-10-11 Stephane Letz + + * Internal loadable client implementation (in progress). + +2007-10-08 Stephane Letz + + * Use .jackdrc file (instead of .jackdmprc). Install script now creates a link "jackd ==> jackdmp" so that automatic launch can work correctly. + * Paul Davis patch for -r (--replace-registry) feature. + +2007-10-07 Stephane Letz + + * Add missing timestamps.c and timestamps.h files. Correctly export public headers in OSX frameworks. Suppress JackEngine::ClientInternalCloseIm method. + +2007-10-04 Stephane Letz + + * Correct "jack_register_server" in shm.c. + +2007-10-04 Stephane Letz + + * Fix a resource leak issue in JackCoreAudioDriver::Close(). Better implement "jack_client_open" when linking a client with the server library. + +2007-10-03 Stephane Letz + + * Rename server_name from "default" to "jackdmp_default" to avoid conflict with regular jackd server. + +2007-10-02 Stephane Letz + + * Correct jack_client_open "status" management. + +2007-08-27 Stephane Letz + + * Server/library protocol checking implementation. + +2007-08-26 Stephane Letz + + * Make "Rename" a method of JackPort class, call it from driver Attach method. + +2007-08-24 Stephane Letz + + * Implement server temporary (-T) mode. + +2007-08-23 Stephane Letz + + * Fix a bug in jack_test. Correct JackShmMem destructor. Correct end case in JackClient::Execute. Correct JackMachSemaphore::Disconnect. + +2007-08-22 Stephane Letz + + * Fix a bug in JackLibClient::Open introduced when adding automatic client renaming. + +2007-08-21 Stephane Letz + + * Fix backend port alias management (renaming in system:xxx). + +2007-08-20 Stephane Letz + + * Automatic server launch. Removes unneeded 'volatile' for JackTransportEngine::fWriteCounter. + +2007-08-19 Stephane Letz + + * Add "systemic" latencies management in CoreAudio driver. + +2007-08-16 Stephane Letz + + * Automatic client renaming. + +2007-07-27 Stephane Letz + + * Correct JackEngine::ClientCloseAux (when called from JackEngine::ClientExternalOpen). Correct JackWinEvent::Allocate. + +2007-07-20 Stephane Letz + + * Correct notification for kActivateClient event. + +2007-06-11 Stephane Letz + + * Dmitry Baikov buffer size patch. + +2007-06-10 Stephane Letz + + * Correct deprecated jack_set_sample_rate_callback to return 0 instead of -1. + +2007-06-09 Stephane Letz + + * Checking in the server to avoid calling the clients if no callback are registered. + +2007-06-08 Stephane Letz + + * New JackNotication.h header in preparation for callback checking in the server. + +2007-05-29 Stephane Letz + + * Add "callback exiting" and "jack_frame_time" tests in jack_test. + +2007-05-09 Stephane Letz + + * Add a mutex in JackGraphManager AllocatePort/ReleasePort methods. + +2007-05-05 Stephane Letz + + * Add jack_set_client_registration_callback API. + +2007-05-04 Stephane Letz + + * Steven Chamberlain patch to fix jack_port_type. Test for jack_port_type behaviour in jack_test.cpp tool. + +2007-05-03 Stephane Letz + + * Steven Chamberlain patch to fix jack_port_by_id export. + +2007-04-28 Stephane Letz + + * Add new jack_port_set_alias, jack_port_unset_alias and jack_port_get_aliases API. + +2007-04-27 Stephane Letz + + * Add missing -D__SMP__in OSX project. + +2007-04-23 Stephane Letz + + * Dmitry Baikov jackmp-time patch: add jack_get_time, jack_time_to_frames, jack_frames_to_time. + +2007-04-03 Stephane Letz + + * Dmitry Baikov remove-nframes patch. + +2007-04-02 Stephane Letz + + * Dmitry Baikov lost-event patch. + +2007-04-01 Stephane Letz + + * Merge JackGraphManager Remove and Release method in a unique Release method. + +2007-03-12 Stephane Letz + + * Bug fix in JackMidiBuffer::MaxEventSize(). + +2007-03-09 Stephane Letz + + * Dmitry Baikov MIDI patch phase 2. + +2007-03-08 Stephane Letz + + * Dmitry Baikov jackmp-port-clear patch. + +2007-03-06 Stephane Letz + + * Dmitry Baikov MIDI patch phase 1. + +2007-03-04 Stephane Letz + + * Dmitry Baikov patch for JackGraphManager.cpp. + * Dmitry Baikov MIDI patch phase 0. + +2007-02-19 Stephane Letz + + * Correct back JackAlsaDriver::Read method. + +2007-02-14 Stephane Letz + + * Better error checking in PortAudio driver. + +2007-02-07 Stephane Letz + + * Thom Johansen fix for port buffer alignment issues. + +2007-02-05 Stephane Letz + + * Add Pieter Palmers FreeBob driver. + * Thibault LeMeur ALSA driver patch. + +2007-01-31 Stephane Letz + + * Use pthread_attr_setstacksize in JackPosixThread class. + +2007-01-30 Stephane Letz + + * New LockAllMemory and UnlockAllMemory functions. + +2007-01-29 Stephane Letz + + * More robust activation/deactivation code, especially in case of client crash. + +2007-01-27 Stephane Letz + + * Uses a time out value of 10 sec in freewheel mode (like jack). + +2007-01-21 Stephane Letz + + * More client debug code: check if the client is still valid in every JackDebugClient method, check if the library context is still valid in every API call. + +2007-01-14 Stephane Letz + + * Implement thread.h API. + +2007-01-09 Stephane Letz + + * New server/client data transfer model to fix a 64 bits system bug. Fix a device name reversal bug in ALSA driver. + +2007-01-04 Stephane Letz + + * Add call to the init callback (set up using the jack_set_thread_init_callback API) in Real-Time and Notification threads. Define a new 'kActivateClient' notification. + +2007-01-02 Stephane Letz + + * Internal cleanup. + +2006-12-23 Stephane Letz + + * shared_ports renamed to shared_graph. + +2006-12-15 Stephane Letz + + * Move client refnum management in JackEngine. + +2006-12-12 Stephane Letz + + * Tom Szilagyi memory leak fix in ringbuffer.c. + +2006-11-29 Stephane Letz + + * Correct JackWinEnvent::Allocate (handle the ERROR_ALREADY_EXISTS case). Correct JackEngine::ClientExternalNew. + * Karsten Wiese correction for ALSA usx2y driver. + +2006-11-22 Stephane Letz + + * In synchronous mode, if the driver time out is reached, the server may get desynchronized (pending signal may arrive in later cycles), + improve audio driver synchronous code to better handle this case. + +2006-11-08 Stephane Letz + + * Synchronize ALSA backend with jack one. + +2006-11-04 Stephane Letz + + * Use -D to setup ADDON_DIR on OSX and Linux. + +2006-10-11 Stephane Letz + + * Correct server SetBufferSize in case of failure. Correct PortAudio driver help. + +2006-10-06 Stephane Letz + + * Add a new cpu testing/loading client. + +2006-09-23 Stephane Letz + + * Rename global "verbose" in "jack_verbose" to avoid symbol clash with PureData. + +2006-09-20 Stephane Letz + + * On Windows, avoid to use the unsafe Kill thread method. Use thread Stop instead and have blocked IO be unlocked. + * Still get RT thread termination problems, restore a version that works on OSX and Linux with conditionnal compilation for now. + +2006-09-16 Stephane Letz + + * Restore behaviour of LoopBack driver, which has to be opened in any case... + +2006-09-15 Stephane Letz + + * On Windows version, use signal to quit the server. + +2006-09-13 Stephane Letz + + * Correct pipe destruction bug in JackWinNamedPipe class. + +2006-09-11 Stephane Letz + + * Handling of LoopBack driver only when really needed. + * Correct crash bug when closing clients on Windows due to multi-threading synchronization issues. + +2006-09-06 Stephane Letz + + * Correct coreaudio driver (input was not working since 0.55 version). + * Version for 0.58 release. + +2006-09-04 Stephane Letz + + * Correct Windows VC++ projects. + +2006-09-03 Stephane Letz + + * First import of version 0.58 base code diff --git a/common/JackAPIWrapper.cpp b/common/JackAPIWrapper.cpp index d0b56841..319d6339 100644 --- a/common/JackAPIWrapper.cpp +++ b/common/JackAPIWrapper.cpp @@ -238,8 +238,11 @@ static void (*error_fun)(const char *) = 0; static void (*info_fun)(const char *) = 0; static bool jack_debug = false; - static unsigned int gClientCount = 0; +static FILE* gWrapperLog = NULL; + +void log_init() __attribute__ ((constructor)); +void log_uninit() __attribute__ ((destructor)); static void rewrite_name(const char* name, char* new_name) { @@ -258,13 +261,43 @@ static void jack_log(const char *fmt, ...) if (jack_debug) { va_list ap; va_start(ap, fmt); - fprintf(stderr,"Jack: "); - vfprintf(stderr, fmt, ap); - fprintf(stderr,"\n"); + if (gWrapperLog) { + fprintf(gWrapperLog,"Jack: "); + vfprintf(gWrapperLog, fmt, ap); + fprintf(gWrapperLog,"\n"); + } else { + fprintf(stderr, "Jack: "); + vfprintf(stderr, fmt, ap); + fprintf(stderr,"\n"); + } va_end(ap); } } +void log_init() +{ + char* jack_debug_var = getenv("JACK_WRAPPER_DEBUG"); + + if (jack_debug_var) { + if (strcmp(jack_debug_var, "file") == 0 && gWrapperLog == NULL) { + gWrapperLog = fopen("wrapper.log", "w"); + jack_debug = true; + } else if (strcmp(jack_debug_var, "on") == 0) { + jack_debug = true; + } else { + jack_debug = false; + } + } +} + +void log_uninit() +{ + if (gWrapperLog != NULL) { + fclose(gWrapperLog); + gWrapperLog = NULL; + } +} + /* Exec the JACK server in this process. Does not return. */ static void start_server_aux(const char* server_name) { @@ -1243,6 +1276,8 @@ static jack_client_t * jack_client_open_aux(const char *ext_client_name, jack_op EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_options_t options, jack_status_t* status, ...) { +jack_log("jack_client_open"); + va_list ap; va_start(ap, status); jack_client_t* res = jack_client_open_aux(ext_client_name, options, status, ap); @@ -1402,9 +1437,7 @@ static bool open_library() return true; char library_res_name[256]; - char* jack_debug_var = getenv("JACK_WRAPPER_DEBUG"); - jack_debug = (jack_debug_var && strcmp(jack_debug_var, "on") == 0); - + void* jackLibrary = (get_jack_library(JACK_LIB, library_res_name)) ? dlopen(library_res_name, RTLD_LAZY) : 0; void* jackmpLibrary = (get_jack_library(JACKMP_LIB, library_res_name)) ? dlopen(library_res_name, RTLD_LAZY) : 0;