| control.h | | control.h | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| /** Parameter types, intentionally similar to jack_driver_param_type_t */ | | /** Parameter types, intentionally similar to jack_driver_param_type_t */ | |
| typedef enum | | typedef enum | |
| { | | { | |
| JackParamInt = 1, /**< @brief value type is a signed i
nteger */ | | JackParamInt = 1, /**< @brief value type is a signed i
nteger */ | |
| JackParamUInt, /**< @brief value type is an
unsigned integer */ | | JackParamUInt, /**< @brief value type is an
unsigned integer */ | |
| JackParamChar, /**< @brief value type is a
char */ | | JackParamChar, /**< @brief value type is a
char */ | |
| JackParamString, /**< @brief value type is a string w
ith max size of ::JACK_PARAM_STRING_MAX+1 chars */ | | JackParamString, /**< @brief value type is a string w
ith max size of ::JACK_PARAM_STRING_MAX+1 chars */ | |
| JackParamBool, /**< @brief value type is a
boolean */ | | JackParamBool, /**< @brief value type is a
boolean */ | |
| } jackctl_param_type_t; | | } jackctl_param_type_t; | |
| | | | |
|
| | | /** Driver types */ | |
| | | typedef enum | |
| | | { | |
| | | JackMaster = 1, /**< @brief master driver */ | |
| | | JackSlave /**< @brief slave driver */ | |
| | | } jackctl_driver_type_t; | |
| | | | |
| /** @brief Max value that jackctl_param_type_t type can have */ | | /** @brief Max value that jackctl_param_type_t type can have */ | |
| #define JACK_PARAM_MAX (JackParamBool + 1) | | #define JACK_PARAM_MAX (JackParamBool + 1) | |
| | | | |
| /** @brief Max length of string parameter value, excluding terminating null
char */ | | /** @brief Max length of string parameter value, excluding terminating null
char */ | |
| #define JACK_PARAM_STRING_MAX 127 | | #define JACK_PARAM_STRING_MAX 127 | |
| | | | |
| /** @brief Type for parameter value */ | | /** @brief Type for parameter value */ | |
| /* intentionally similar to jack_driver_param_value_t */ | | /* intentionally similar to jack_driver_param_value_t */ | |
| union jackctl_parameter_value | | union jackctl_parameter_value | |
| { | | { | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 92 | |
| typedef struct jackctl_parameter jackctl_parameter_t; | | typedef struct jackctl_parameter jackctl_parameter_t; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| #if 0 | | #if 0 | |
| } /* Adjust editor indent */ | | } /* Adjust editor indent */ | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * @defgroup ServerControl Controling the server | | * @defgroup ControlAPI The API for starting and controlling a JACK server | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Call this function to setup process signal handling. As a general | | * Call this function to setup process signal handling. As a general | |
| * rule, it is required for proper operation for the server object. | | * rule, it is required for proper operation for the server object. | |
| * | | * | |
| * @param flags signals setup flags, use 0 for none. Currently no | | * @param flags signals setup flags, use 0 for none. Currently no | |
| * flags are defined | | * flags are defined | |
| * | | * | |
| | | | |
| skipping to change at line 301 | | skipping to change at line 308 | |
| * @param driver driver object handle to get name of | | * @param driver driver object handle to get name of | |
| * | | * | |
| * @return driver name. Must not be modified. Always same for same | | * @return driver name. Must not be modified. Always same for same | |
| * driver object. | | * driver object. | |
| */ | | */ | |
| const char * | | const char * | |
| jackctl_driver_get_name( | | jackctl_driver_get_name( | |
| jackctl_driver_t * driver); | | jackctl_driver_t * driver); | |
| | | | |
| /** | | /** | |
|
| | | * Call this function to get type of driver. | |
| | | * | |
| | | * @param driver driver object handle to get name of | |
| | | * | |
| | | * @return driver type. Must not be modified. Always same for same | |
| | | * driver object. | |
| | | */ | |
| | | jackctl_driver_type_t | |
| | | jackctl_driver_get_type( | |
| | | jackctl_driver_t * driver); | |
| | | | |
| | | /** | |
| * Call this function to get list of driver parameters. List node data | | * Call this function to get list of driver parameters. List node data | |
| * pointers is a parameter object handle (::jackctl_parameter_t). | | * pointers is a parameter object handle (::jackctl_parameter_t). | |
| * | | * | |
| * @param driver driver object handle to get parameters for | | * @param driver driver object handle to get parameters for | |
| * | | * | |
| * @return Single linked list of parameter object handles. Must not be | | * @return Single linked list of parameter object handles. Must not be | |
| * modified. Always same for same driver object. | | * modified. Always same for same driver object. | |
| */ | | */ | |
| const JSList * | | const JSList * | |
| jackctl_driver_get_parameters( | | jackctl_driver_get_parameters( | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 20 lines changed or added | |
|
| jack.h | | jack.h | |
| | | | |
| skipping to change at line 236 | | skipping to change at line 236 | |
| */ | | */ | |
| jack_nframes_t jack_thread_wait (jack_client_t*, int status) JACK_OPTIONAL_
WEAK_EXPORT; | | jack_nframes_t jack_thread_wait (jack_client_t*, int status) JACK_OPTIONAL_
WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Wait until this JACK client should process data. | | * Wait until this JACK client should process data. | |
| * | | * | |
| * @param client - pointer to a JACK client structure | | * @param client - pointer to a JACK client structure | |
| * | | * | |
| * @return the number of frames of data to process | | * @return the number of frames of data to process | |
| */ | | */ | |
|
| jack_nframes_t jack_cycle_wait (jack_client_t* client) JACK_OPTIONAL_WE
AK_EXPORT; | | jack_nframes_t jack_cycle_wait (jack_client_t* client) JACK_OPTIONAL_WEAK_E
XPORT; | |
| | | | |
| /** | | /** | |
| * Signal next clients in the graph. | | * Signal next clients in the graph. | |
| * | | * | |
| * @param client - pointer to a JACK client structure | | * @param client - pointer to a JACK client structure | |
| * @param status - if non-zero, calling thread should exit | | * @param status - if non-zero, calling thread should exit | |
| */ | | */ | |
| void jack_cycle_signal (jack_client_t* client, int status) JACK_OPTIONAL_WE
AK_EXPORT; | | void jack_cycle_signal (jack_client_t* client, int status) JACK_OPTIONAL_WE
AK_EXPORT; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 313 | | skipping to change at line 313 | |
| * NOTE: clients do not need to call this. It exists only | | * NOTE: clients do not need to call this. It exists only | |
| * to help more complex clients understand what is going | | * to help more complex clients understand what is going | |
| * on. It should be called before jack_client_activate(). | | * on. It should be called before jack_client_activate(). | |
| * | | * | |
| * NOTE: if a client calls this AND jack_on_info_shutdown(), then | | * NOTE: if a client calls this AND jack_on_info_shutdown(), then | |
| * the event of a client thread shutdown, the callback | | * the event of a client thread shutdown, the callback | |
| * passed to this function will not be called, and the one passed to | | * passed to this function will not be called, and the one passed to | |
| * jack_on_info_shutdown() will. | | * jack_on_info_shutdown() will. | |
| */ | | */ | |
| void jack_on_shutdown (jack_client_t *client, | | void jack_on_shutdown (jack_client_t *client, | |
|
| JackShutdownCallback shutdown_callback, void *arg) J
ACK_WEAK_EXPORT; | | JackShutdownCallback shutdown_callback, void *arg) J
ACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @param client pointer to JACK client structure. | | * @param client pointer to JACK client structure. | |
| * @param function The jack_info_shutdown function pointer. | | * @param function The jack_info_shutdown function pointer. | |
| * @param arg The arguments for the jack_info_shutdown function. | | * @param arg The arguments for the jack_info_shutdown function. | |
| * | | * | |
| * Register a function (and argument) to be called if and when the | | * Register a function (and argument) to be called if and when the | |
| * JACK server shuts down the client thread. The function must | | * JACK server shuts down the client thread. The function must | |
| * be written as if it were an asynchonrous POSIX signal | | * be written as if it were an asynchonrous POSIX signal | |
| * handler --- use only async-safe functions, and remember that it | | * handler --- use only async-safe functions, and remember that it | |
| | | | |
| skipping to change at line 339 | | skipping to change at line 339 | |
| * NOTE: clients do not need to call this. It exists only | | * NOTE: clients do not need to call this. It exists only | |
| * to help more complex clients understand what is going | | * to help more complex clients understand what is going | |
| * on. It should be called before jack_client_activate(). | | * on. It should be called before jack_client_activate(). | |
| * | | * | |
| * NOTE: if a client calls this AND jack_on_info_shutdown(), then | | * NOTE: if a client calls this AND jack_on_info_shutdown(), then | |
| * the event of a client thread shutdown, the callback | | * the event of a client thread shutdown, the callback | |
| * passed to this function will not be called, and the one passed to | | * passed to this function will not be called, and the one passed to | |
| * jack_on_info_shutdown() will. | | * jack_on_info_shutdown() will. | |
| */ | | */ | |
| void jack_on_info_shutdown (jack_client_t *client, | | void jack_on_info_shutdown (jack_client_t *client, | |
|
| JackInfoShutdownCallback shutdown_callback, voi
d *arg) JACK_OPTIONAL_WEAK_EXPORT; | | JackInfoShutdownCallback shutdown_callback, voi
d *arg) JACK_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Tell the Jack server to call @a process_callback whenever there is | | * Tell the Jack server to call @a process_callback whenever there is | |
| * work be done, passing @a arg as the second argument. | | * work be done, passing @a arg as the second argument. | |
| * | | * | |
| * The code in the supplied function must be suitable for real-time | | * The code in the supplied function must be suitable for real-time | |
| * execution. That means that it cannot call functions that might | | * execution. That means that it cannot call functions that might | |
| * block for a long time. This includes malloc, free, printf, | | * block for a long time. This includes malloc, free, printf, | |
| * pthread_mutex_lock, sleep, wait, poll, select, pthread_join, | | * pthread_mutex_lock, sleep, wait, poll, select, pthread_join, | |
| * pthread_cond_wait, etc, etc. See | | * pthread_cond_wait, etc, etc. See | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| midiport.h | | midiport.h | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| /** | | /** | |
| * @defgroup MIDIAPI Reading and writing MIDI data | | * @defgroup MIDIAPI Reading and writing MIDI data | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** Get number of events in a port buffer. | | /** Get number of events in a port buffer. | |
| * | | * | |
| * @param port_buffer Port buffer from which to retrieve event. | | * @param port_buffer Port buffer from which to retrieve event. | |
| * @return number of events inside @a port_buffer | | * @return number of events inside @a port_buffer | |
| */ | | */ | |
|
| jack_nframes_t | | uint32_t | |
| jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT; | | jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** Get a MIDI event from an event port buffer. | | /** Get a MIDI event from an event port buffer. | |
| * | | * | |
| * Jack MIDI is normalised, the MIDI event returned by this function is | | * Jack MIDI is normalised, the MIDI event returned by this function is | |
| * guaranteed to be a complete MIDI event (the status byte will always be | | * guaranteed to be a complete MIDI event (the status byte will always be | |
| * present, and no realtime events will interspered with the event). | | * present, and no realtime events will interspered with the event). | |
| * | | * | |
| * @param event Event structure to store retrieved event in. | | * @param event Event structure to store retrieved event in. | |
| * @param port_buffer Port buffer from which to retrieve event. | | * @param port_buffer Port buffer from which to retrieve event. | |
| * @param event_index Index of event to retrieve. | | * @param event_index Index of event to retrieve. | |
| * @return 0 on success, ENODATA if buffer is empty. | | * @return 0 on success, ENODATA if buffer is empty. | |
| */ | | */ | |
| int | | int | |
| jack_midi_event_get(jack_midi_event_t *event, | | jack_midi_event_get(jack_midi_event_t *event, | |
|
| void *port_buffer, | | void *port_buffer, | |
| jack_nframes_t event_index) JACK_OPTIONAL_WEAK_EXPO | | uint32_t event_index) JACK_OPTIONAL_WEAK_EXPORT; | |
| RT; | | | |
| | | | |
| /** Clear an event buffer. | | /** Clear an event buffer. | |
| * | | * | |
| * This should be called at the beginning of each process cycle before call
ing | | * This should be called at the beginning of each process cycle before call
ing | |
| * @ref jack_midi_event_reserve or @ref jack_midi_event_write. This | | * @ref jack_midi_event_reserve or @ref jack_midi_event_write. This | |
| * function may not be called on an input port's buffer. | | * function may not be called on an input port's buffer. | |
| * | | * | |
| * @param port_buffer Port buffer to clear (must be an output port buffer). | | * @param port_buffer Port buffer to clear (must be an output port buffer). | |
| */ | | */ | |
| void | | void | |
| | | | |
| skipping to change at line 151 | | skipping to change at line 151 | |
| size_t data_size) JACK_OPTIONAL_WEAK_EXPORT; | | size_t data_size) JACK_OPTIONAL_WEAK_EXPORT; | |
| | | | |
| /** Get the number of events that could not be written to @a port_buffer. | | /** Get the number of events that could not be written to @a port_buffer. | |
| * | | * | |
| * This function returning a non-zero value implies @a port_buffer is full. | | * This function returning a non-zero value implies @a port_buffer is full. | |
| * Currently the only way this can happen is if events are lost on port mix
down. | | * Currently the only way this can happen is if events are lost on port mix
down. | |
| * | | * | |
| * @param port_buffer Port to receive count for. | | * @param port_buffer Port to receive count for. | |
| * @returns Number of events that could not be written to @a port_buffer. | | * @returns Number of events that could not be written to @a port_buffer. | |
| */ | | */ | |
|
| jack_nframes_t | | uint32_t | |
| jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
; | | jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
; | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* __JACK_MIDIPORT_H */ | | #endif /* __JACK_MIDIPORT_H */ | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 4 lines changed or added | |
|
| session.h | | session.h | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| #include <jack/weakmacros.h> | | #include <jack/weakmacros.h> | |
| | | | |
| /** | | /** | |
| * @defgroup SessionClientFunctions Session API for clients. | | * @defgroup SessionClientFunctions Session API for clients. | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Session event type. | | * Session event type. | |
| * | | * | |
|
| * if a client cant save templates, i might just do a normal save. | | * If a client cant save templates, i might just do a normal save. | |
| * | | * | |
| * There is no "quit without saving" event because a client might refuse to | | * There is no "quit without saving" event because a client might refuse to | |
| * quit when it has unsaved data, but other clients may have already quit. | | * quit when it has unsaved data, but other clients may have already quit. | |
| * This results in too much confusion, so it is unsupported. | | * This results in too much confusion, so it is unsupported. | |
| */ | | */ | |
| enum JackSessionEventType { | | enum JackSessionEventType { | |
| /** | | /** | |
| * Save the session completely. | | * Save the session completely. | |
| * | | * | |
| * The client may save references to data outside the provided direc
tory, | | * The client may save references to data outside the provided direc
tory, | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 191 | |
| * This can either be called directly from the callback, or later from a | | * This can either be called directly from the callback, or later from a | |
| * different thread. For example, it is possible to push the event through
a | | * different thread. For example, it is possible to push the event through
a | |
| * queue and execute the save code from the GUI thread. | | * queue and execute the save code from the GUI thread. | |
| * | | * | |
| * @return 0 on success, otherwise a non-zero error code | | * @return 0 on success, otherwise a non-zero error code | |
| */ | | */ | |
| int jack_session_reply (jack_client_t *client, | | int jack_session_reply (jack_client_t *client, | |
| jack_session_event_t *event) JACK_WEAK_EXPORT; | | jack_session_event_t *event) JACK_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
|
| * free memory used by a jack_session_event_t | | * Free memory used by a jack_session_event_t. | |
| * this also frees the memory used by the command_line pointer. | | * | |
| * if its non NULL. | | * This also frees the memory used by the command_line pointer, if its non | |
| | | NULL. | |
| */ | | */ | |
| void jack_session_event_free (jack_session_event_t *event) JACK_WEAK_EXPORT
; | | void jack_session_event_free (jack_session_event_t *event) JACK_WEAK_EXPORT
; | |
| | | | |
| /** | | /** | |
|
| * get the assigned uuid for client. | | * Get the assigned uuid for client. | |
| * safe to call from callback and all other threads. | | * Safe to call from callback and all other threads. | |
| * memory needs to be freed. | | * | |
| | | * The caller is responsible for calling jack_free(3) on any non-NULL | |
| | | * returned value. | |
| */ | | */ | |
|
| | | | |
| char *jack_client_get_uuid (jack_client_t *client) JACK_WEAK_EXPORT; | | char *jack_client_get_uuid (jack_client_t *client) JACK_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * @defgroup JackSessionManagerAPI API for a session manager. | | * @defgroup JackSessionManagerAPI API for a session manager. | |
| * | | * | |
| * @{ | | * @{ | |
| | | | |
| skipping to change at line 242 | | skipping to change at line 243 | |
| jack_session_event_type_t type, | | jack_session_event_type_t type, | |
| const char *path) JACK_WEAK_EXPORT; | | const char *path) JACK_WEAK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Free the memory allocated by a session command. | | * Free the memory allocated by a session command. | |
| */ | | */ | |
| void jack_session_commands_free (jack_session_command_t *cmds) JACK_WEAK_EX
PORT; | | void jack_session_commands_free (jack_session_command_t *cmds) JACK_WEAK_EX
PORT; | |
| | | | |
| /** | | /** | |
| * Get the session ID for a client name. | | * Get the session ID for a client name. | |
|
| | | * | |
| * The session manager needs this to reassociate a client name to the sessi
on_id. | | * The session manager needs this to reassociate a client name to the sessi
on_id. | |
|
| | | * | |
| | | * The caller is responsible for calling jack_free(3) on any non-NULL | |
| | | * returned value. | |
| */ | | */ | |
| char *jack_get_uuid_for_client_name (jack_client_t *client, | | char *jack_get_uuid_for_client_name (jack_client_t *client, | |
| const char *client_name) JACK_WEAK_
EXPORT; | | const char *client_name) JACK_WEAK_
EXPORT; | |
| | | | |
| /** | | /** | |
| * Get the client name for a session_id. | | * Get the client name for a session_id. | |
| * | | * | |
| * In order to snapshot the graph connections, the session manager needs to
map | | * In order to snapshot the graph connections, the session manager needs to
map | |
| * session_ids to client names. | | * session_ids to client names. | |
|
| | | * | |
| | | * The caller is responsible for calling jack_free(3) on any non-NULL | |
| | | * returned value. | |
| */ | | */ | |
| char *jack_get_client_name_by_uuid (jack_client_t *client, | | char *jack_get_client_name_by_uuid (jack_client_t *client, | |
| const char *client_uuid ) JACK_WEAK_
EXPORT; | | const char *client_uuid ) JACK_WEAK_
EXPORT; | |
| | | | |
| /** | | /** | |
| * Reserve a client name and associate it with a UUID. | | * Reserve a client name and associate it with a UUID. | |
| * | | * | |
| * When a client later calls jack_client_open() and specifies the UUID, jac
kd | | * When a client later calls jack_client_open() and specifies the UUID, jac
kd | |
| * will assign the reserved name. This allows a session manager to know in | | * will assign the reserved name. This allows a session manager to know in | |
| * advance under which client name its managed clients will appear. | | * advance under which client name its managed clients will appear. | |
| | | | |
End of changes. 7 change blocks. |
| 8 lines changed or deleted | | 17 lines changed or added | |
|
| systemdeps.h | | systemdeps.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
| | | | |
| */ | | */ | |
| | | | |
| #ifndef __jack_systemdeps_h__ | | #ifndef __jack_systemdeps_h__ | |
| #define __jack_systemdeps_h__ | | #define __jack_systemdeps_h__ | |
| | | | |
|
| #ifdef WIN32 | | #if defined(WIN32) && !defined(__CYGWIN__) && !defined(GNU_WIN32) | |
| | | | |
| #include <windows.h> | | #include <windows.h> | |
| | | | |
| #ifdef _MSC_VER /* Microsoft compiler */ | | #ifdef _MSC_VER /* Microsoft compiler */ | |
| #define __inline__ inline | | #define __inline__ inline | |
|
| #ifndef int8_t | | #if (!defined(int8_t) && !defined(_STDINT_H)) | |
| | | #define __int8_t_defined | |
| typedef char int8_t; | | typedef char int8_t; | |
| typedef unsigned char uint8_t; | | typedef unsigned char uint8_t; | |
| typedef short int16_t; | | typedef short int16_t; | |
| typedef unsigned short uint16_t; | | typedef unsigned short uint16_t; | |
| typedef long int32_t; | | typedef long int32_t; | |
| typedef unsigned long uint32_t; | | typedef unsigned long uint32_t; | |
| typedef LONGLONG int64_t; | | typedef LONGLONG int64_t; | |
| typedef ULONGLONG uint64_t; | | typedef ULONGLONG uint64_t; | |
| #endif | | #endif | |
|
| /** | | | |
| * to make jack API independent of different thread implementations, | | | |
| * we define jack_native_thread_t to HANDLE here. | | | |
| */ | | | |
| typedef HANDLE jack_native_thread_t; | | | |
| #elif __MINGW32__ /* MINGW */ | | #elif __MINGW32__ /* MINGW */ | |
| #include <stdint.h> | | #include <stdint.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| | | #else /* other compilers ...*/ | |
| | | #include <inttypes.h> | |
| | | #include <pthread.h> | |
| | | #include <sys/types.h> | |
| | | #endif | |
| | | | |
| | | #if !defined(_PTHREAD_H) && !defined(PTHREAD_WIN32) | |
| /** | | /** | |
| * to make jack API independent of different thread implementations, | | * to make jack API independent of different thread implementations, | |
| * we define jack_native_thread_t to HANDLE here. | | * we define jack_native_thread_t to HANDLE here. | |
| */ | | */ | |
| typedef HANDLE jack_native_thread_t; | | typedef HANDLE jack_native_thread_t; | |
|
| #else /* other compilers ...*/ | | #else | |
| #include <inttypes.h> | | #ifdef PTHREAD_WIN32 // Added by JE - 10-10-2011 | |
| #include <pthread.h> | | #include <ptw32/pthread.h> // Makes sure we #include the ptw32 ver | |
| #include <sys/types.h> | | sion ! | |
| | | #endif | |
| | | /** | |
| | | * to make jack API independent of different thread implementations, | |
| | | * we define jack_native_thread_t to pthread_t here. | |
| | | */ | |
| | | typedef pthread_t jack_native_thread_t; | |
| #endif | | #endif | |
| | | | |
|
| #endif /* WIN32 */ | | #endif // WIN32 && !__CYGWIN__ && !GNU_WIN32 */ | |
| | | | |
|
| #if defined(__APPLE__) || defined(__linux__) || defined(__sun__) || defined | | #if defined(__APPLE__) || defined(__linux__) || defined(__sun__) || defined | |
| (sun) || defined(__unix__) | | (sun) || defined(__unix__) || defined(__CYGWIN__) || defined(GNU_WIN32) | |
| | | | |
| | | #if defined(__CYGWIN__) || defined(GNU_WIN32) | |
| | | #include <stdint.h> | |
| | | #endif | |
| #include <inttypes.h> | | #include <inttypes.h> | |
| #include <pthread.h> | | #include <pthread.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| | | | |
| /** | | /** | |
| * to make jack API independent of different thread implementations, | | * to make jack API independent of different thread implementations, | |
| * we define jack_native_thread_t to pthread_t here. | | * we define jack_native_thread_t to pthread_t here. | |
| */ | | */ | |
| typedef pthread_t jack_native_thread_t; | | typedef pthread_t jack_native_thread_t; | |
| | | | |
| | | | |
End of changes. 7 change blocks. |
| 14 lines changed or deleted | | 27 lines changed or added | |
|
| transport.h | | transport.h | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 191 | |
| * sync_callbacks until ready. This function is realtime-safe. | | * sync_callbacks until ready. This function is realtime-safe. | |
| * | | * | |
| * @see jack_transport_locate, jack_set_sync_callback | | * @see jack_transport_locate, jack_set_sync_callback | |
| * | | * | |
| * @param client the JACK client structure. | | * @param client the JACK client structure. | |
| * @param pos requested new transport position. | | * @param pos requested new transport position. | |
| * | | * | |
| * @return 0 if valid request, EINVAL if position structure rejected. | | * @return 0 if valid request, EINVAL if position structure rejected. | |
| */ | | */ | |
| int jack_transport_reposition (jack_client_t *client, | | int jack_transport_reposition (jack_client_t *client, | |
|
| jack_position_t *pos) JACK_OPTIONAL_WEAK_EXP
ORT; | | const jack_position_t *pos) JACK_OPTIONAL_WE
AK_EXPORT; | |
| | | | |
| /** | | /** | |
| * Start the JACK transport rolling. | | * Start the JACK transport rolling. | |
| * | | * | |
| * Any client can make this request at any time. It takes effect no | | * Any client can make this request at any time. It takes effect no | |
| * sooner than the next process cycle, perhaps later if there are | | * sooner than the next process cycle, perhaps later if there are | |
| * slow-sync clients. This function is realtime-safe. | | * slow-sync clients. This function is realtime-safe. | |
| * | | * | |
| * @see jack_set_sync_callback | | * @see jack_set_sync_callback | |
| * | | * | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| weakjack.h | | weakjack.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| You should have received a copy of the GNU Lesser General Public Licens
e | | You should have received a copy of the GNU Lesser General Public Licens
e | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U
SA. | | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U
SA. | |
| | | | |
| */ | | */ | |
| | | | |
| #ifndef __weakjack_h__ | | #ifndef __weakjack_h__ | |
| #define __weakjack_h__ | | #define __weakjack_h__ | |
| | | | |
| /** | | /** | |
|
| * @defgroup WeakLinkage managing support for newer/older versions of JACK | | * @defgroup WeakLinkage Managing support for newer/older versions of JACK | |
| * @{ One challenge faced by developers is that of taking advantage of new | | * @{ One challenge faced by developers is that of taking | |
| features introduced in new versions of [ JACK ] while still | | * advantage of new features introduced in new versions | |
| * supporting older versions of the system. Normally, if an application | | * of [ JACK ] while still supporting older versions of | |
| uses a new feature in a library/API, it is unable to run on | | * the system. Normally, if an application uses a new | |
| * earlier versions of the library/API that do not support that feature. | | * feature in a library/API, it is unable to run on | |
| Such applications would either fail to launch or crash when | | * earlier versions of the library/API that do not | |
| * an attempt to use the feature was made. This problem cane be solved u | | * support that feature. Such applications would either | |
| sing weakly-linked symbols. | | * fail to launch or crash when an attempt to use the | |
| | | * feature was made. This problem cane be solved using | |
| | | * weakly-linked symbols. | |
| * | | * | |
|
| * When a symbol in a framework is defined as weakly linked, the symbol | | * When a symbol in a framework is defined as weakly | |
| does not have to be present at runtime for a process to | | * linked, the symbol does not have to be present at | |
| * continue running. The static linker identifies a weakly linked symbol | | * runtime for a process to continue running. The static | |
| as such in any code module that references the symbol. The | | * linker identifies a weakly linked symbol as such in | |
| * dynamic linker uses this same information at runtime to determine whe | | * any code module that references the symbol. The | |
| ther a process can continue running. If a weakly linked symbol | | * dynamic linker uses this same information at runtime | |
| * is not present in the framework, the code module can continue to run | | * to determine whether a process can continue | |
| as long as it does not reference the symbol. However, if the | | * running. If a weakly linked symbol is not present in | |
| * symbol is present, the code can use it normally. | | * the framework, the code module can continue to run as | |
| | | * long as it does not reference the symbol. However, if | |
| | | * the symbol is present, the code can use it normally. | |
| * | | * | |
| * (adapted from: http://developer.apple.com/library/mac/#documentat
ion/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html) | | * (adapted from: http://developer.apple.com/library/mac/#documentat
ion/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html) | |
| * | | * | |
| * A concrete example will help. Suppose that someone uses a version | | * A concrete example will help. Suppose that someone uses a version | |
| * of a JACK client we'll call "Jill". Jill was linked against a version | | * of a JACK client we'll call "Jill". Jill was linked against a version | |
| * of JACK that contains a newer part of the API (say, jack_set_latency_
callback()) | | * of JACK that contains a newer part of the API (say, jack_set_latency_
callback()) | |
| * and would like to use it if it is available. | | * and would like to use it if it is available. | |
| * | | * | |
| * When Jill is run on a system that has a suitably "new" version of | | * When Jill is run on a system that has a suitably "new" version of | |
| * JACK, this function will be available entirely normally. But if Jill | | * JACK, this function will be available entirely normally. But if Jill | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 88 | |
| * | | * | |
| * Such clients should include <jack/weakjack.h> before any other JACK h
eader. | | * Such clients should include <jack/weakjack.h> before any other JACK h
eader. | |
| * This will make the \b entire JACK API be subject to weak linkage, so
that any | | * This will make the \b entire JACK API be subject to weak linkage, so
that any | |
| * and all functions can be checked for existence at runtime. It is impo
rtant | | * and all functions can be checked for existence at runtime. It is impo
rtant | |
| * to understand that very few clients need to do this - if you use this | | * to understand that very few clients need to do this - if you use this | |
| * feature you should have a clear reason to do so. | | * feature you should have a clear reason to do so. | |
| * | | * | |
| * | | * | |
| */ | | */ | |
| | | | |
|
| | | #ifdef __APPLE__ | |
| | | #define WEAK_ATTRIBUTE weak_import | |
| | | #else | |
| | | #define WEAK_ATTRIBUTE __weak__ | |
| | | #endif | |
| | | | |
| #ifndef JACK_OPTIONAL_WEAK_EXPORT | | #ifndef JACK_OPTIONAL_WEAK_EXPORT | |
| /* JACK_OPTIONAL_WEAK_EXPORT needs to be a macro which | | /* JACK_OPTIONAL_WEAK_EXPORT needs to be a macro which | |
| expands into a compiler directive. If non-null, the directive | | expands into a compiler directive. If non-null, the directive | |
| must tell the compiler to arrange for weak linkage of | | must tell the compiler to arrange for weak linkage of | |
| the symbol it used with. For this to work fully may | | the symbol it used with. For this to work fully may | |
| require linker arguments for the client as well. | | require linker arguments for the client as well. | |
| */ | | */ | |
| #ifdef __GNUC__ | | #ifdef __GNUC__ | |
|
| #define JACK_OPTIONAL_WEAK_EXPORT __attribute__((__weak__)) | | #define JACK_OPTIONAL_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE)) | |
| #else | | #else | |
| /* Add other things here for non-gcc platforms */ | | /* Add other things here for non-gcc platforms */ | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| #ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT | | #ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT | |
| /* JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT needs to be a macro | | /* JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT needs to be a macro | |
| which expands into a compiler directive. If non-null, the directive | | which expands into a compiler directive. If non-null, the directive | |
| must tell the compiler to arrange for weak linkage of the | | must tell the compiler to arrange for weak linkage of the | |
| symbol it is used with AND optionally to mark the symbol | | symbol it is used with AND optionally to mark the symbol | |
| as deprecated. For this to work fully may require | | as deprecated. For this to work fully may require | |
| linker arguments for the client as well. | | linker arguments for the client as well. | |
| */ | | */ | |
| #ifdef __GNUC__ | | #ifdef __GNUC__ | |
|
| #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((__weak__,__depr
ecated__)) | | #define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((WEAK_ATTRIBUTE,
__deprecated__)) | |
| #else | | #else | |
| /* Add other things here for non-gcc platforms */ | | /* Add other things here for non-gcc platforms */ | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
| #endif /* weakjack */ | | #endif /* weakjack */ | |
| | | | |
End of changes. 5 change blocks. |
| 20 lines changed or deleted | | 30 lines changed or added | |
|
| weakmacros.h | | weakmacros.h | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| * added to the JACK API after the 0.116.2 release. | | * added to the JACK API after the 0.116.2 release. | |
| * | | * | |
| * Functions that predate this release are marked with | | * Functions that predate this release are marked with | |
| * JACK_WEAK_OPTIONAL_EXPORT which can be defined at compile | | * JACK_WEAK_OPTIONAL_EXPORT which can be defined at compile | |
| * time in a variety of ways. The default definition is empty, | | * time in a variety of ways. The default definition is empty, | |
| * so that these symbols get normal linkage. If you wish to | | * so that these symbols get normal linkage. If you wish to | |
| * use all JACK symbols with weak linkage, include | | * use all JACK symbols with weak linkage, include | |
| * <jack/weakjack.h> before jack.h. | | * <jack/weakjack.h> before jack.h. | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
|
| | | #ifdef __APPLE__ | |
| | | #define WEAK_ATTRIBUTE weak_import | |
| | | #else | |
| | | #define WEAK_ATTRIBUTE __weak__ | |
| | | #endif | |
| | | | |
| #ifndef JACK_WEAK_EXPORT | | #ifndef JACK_WEAK_EXPORT | |
| #ifdef __GNUC__ | | #ifdef __GNUC__ | |
| /* JACK_WEAK_EXPORT needs to be a macro which | | /* JACK_WEAK_EXPORT needs to be a macro which | |
| expands into a compiler directive. If non-null, the directive | | expands into a compiler directive. If non-null, the directive | |
| must tell the compiler to arrange for weak linkage of | | must tell the compiler to arrange for weak linkage of | |
| the symbol it used with. For this to work full may | | the symbol it used with. For this to work full may | |
| require linker arguments in the client as well. | | require linker arguments in the client as well. | |
| */ | | */ | |
|
| #define JACK_WEAK_EXPORT __attribute__((weak)) | | | |
| | | #ifdef WIN32 | |
| | | /* | |
| | | Not working with __declspec(dllexport) so normal linking | |
| | | Linking with JackWeakAPI.cpp will be the preferred way. | |
| | | */ | |
| | | #define JACK_WEAK_EXPORT | |
| | | #else | |
| | | #define JACK_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE)) | |
| | | #endif | |
| | | | |
| #else | | #else | |
| /* Add other things here for non-gcc platforms */ | | /* Add other things here for non-gcc platforms */ | |
| | | | |
| #ifdef WIN32 | | #ifdef WIN32 | |
| #define JACK_WEAK_EXPORT | | #define JACK_WEAK_EXPORT | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 17 lines changed or added | |
|