diff options
Diffstat (limited to 'intern/audaspace/jack')
-rw-r--r-- | intern/audaspace/jack/AUD_JackDevice.cpp | 348 | ||||
-rw-r--r-- | intern/audaspace/jack/AUD_JackDevice.h | 203 | ||||
-rw-r--r-- | intern/audaspace/jack/AUD_JackLibrary.cpp | 128 | ||||
-rw-r--r-- | intern/audaspace/jack/AUD_JackLibrary.h | 104 |
4 files changed, 0 insertions, 783 deletions
diff --git a/intern/audaspace/jack/AUD_JackDevice.cpp b/intern/audaspace/jack/AUD_JackDevice.cpp deleted file mode 100644 index cfbf80ac110..00000000000 --- a/intern/audaspace/jack/AUD_JackDevice.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * Copyright 2009-2011 Jörg Hermann Müller - * - * This file is part of AudaSpace. - * - * Audaspace is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * AudaSpace 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Audaspace; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file audaspace/jack/AUD_JackDevice.cpp - * \ingroup audjack - */ - -#include "AUD_JackDevice.h" -#include "AUD_IReader.h" - -#include <stdio.h> -#include <stdlib.h> - -void* AUD_JackDevice::runMixingThread(void* device) -{ - ((AUD_JackDevice*)device)->updateRingBuffers(); - return NULL; -} - -void AUD_JackDevice::updateRingBuffers() -{ - size_t size, temp; - unsigned int samplesize = AUD_SAMPLE_SIZE(m_specs); - unsigned int i, j; - unsigned int channels = m_specs.channels; - sample_t* buffer = m_buffer.getBuffer(); - float* deinterleave = m_deinterleavebuf.getBuffer(); - jack_transport_state_t state; - jack_position_t position; - - pthread_mutex_lock(&m_mixingLock); - while(m_valid) - { - if(m_sync > 1) - { - if(m_syncFunc) - { - state = AUD_jack_transport_query(m_client, &position); - m_syncFunc(m_syncFuncData, state != JackTransportStopped, position.frame / (float) m_specs.rate); - } - - for(i = 0; i < channels; i++) - AUD_jack_ringbuffer_reset(m_ringbuffers[i]); - } - - size = AUD_jack_ringbuffer_write_space(m_ringbuffers[0]); - for(i = 1; i < channels; i++) - if((temp = AUD_jack_ringbuffer_write_space(m_ringbuffers[i])) < size) - size = temp; - - while(size > samplesize) - { - size /= samplesize; - mix((data_t*)buffer, size); - for(i = 0; i < channels; i++) - { - for(j = 0; j < size; j++) - deinterleave[i * size + j] = buffer[i + j * channels]; - AUD_jack_ringbuffer_write(m_ringbuffers[i], (char*)(deinterleave + i * size), size * sizeof(float)); - } - - size = AUD_jack_ringbuffer_write_space(m_ringbuffers[0]); - for(i = 1; i < channels; i++) - if((temp = AUD_jack_ringbuffer_write_space(m_ringbuffers[i])) < size) - size = temp; - } - - if(m_sync > 1) - { - m_sync = 3; - } - - pthread_cond_wait(&m_mixingCondition, &m_mixingLock); - } - pthread_mutex_unlock(&m_mixingLock); -} - -int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data) -{ - AUD_JackDevice* device = (AUD_JackDevice*)data; - unsigned int i; - int count = device->m_specs.channels; - char* buffer; - - if(device->m_sync) - { - // play silence while syncing - for(unsigned int i = 0; i < count; i++) - memset(AUD_jack_port_get_buffer(device->m_ports[i], length), 0, length * sizeof(float)); - } - else - { - size_t temp; - size_t readsamples = AUD_jack_ringbuffer_read_space(device->m_ringbuffers[0]); - for(i = 1; i < count; i++) - if((temp = AUD_jack_ringbuffer_read_space(device->m_ringbuffers[i])) < readsamples) - readsamples = temp; - - readsamples = AUD_MIN(readsamples / sizeof(float), length); - - for(unsigned int i = 0; i < count; i++) - { - buffer = (char*)AUD_jack_port_get_buffer(device->m_ports[i], length); - AUD_jack_ringbuffer_read(device->m_ringbuffers[i], buffer, readsamples * sizeof(float)); - if(readsamples < length) - memset(buffer + readsamples * sizeof(float), 0, (length - readsamples) * sizeof(float)); - } - - if(pthread_mutex_trylock(&(device->m_mixingLock)) == 0) - { - pthread_cond_signal(&(device->m_mixingCondition)); - pthread_mutex_unlock(&(device->m_mixingLock)); - } - } - - return 0; -} - -int AUD_JackDevice::jack_sync(jack_transport_state_t state, jack_position_t* pos, void* data) -{ - AUD_JackDevice* device = (AUD_JackDevice*)data; - - if(state == JackTransportStopped) - return 1; - - if(pthread_mutex_trylock(&(device->m_mixingLock)) == 0) - { - if(device->m_sync > 2) - { - if(device->m_sync == 3) - { - device->m_sync = 0; - pthread_mutex_unlock(&(device->m_mixingLock)); - return 1; - } - } - else - { - device->m_sync = 2; - pthread_cond_signal(&(device->m_mixingCondition)); - } - pthread_mutex_unlock(&(device->m_mixingLock)); - } - else if(!device->m_sync) - device->m_sync = 1; - - return 0; -} - -void AUD_JackDevice::jack_shutdown(void *data) -{ - AUD_JackDevice* device = (AUD_JackDevice*)data; - device->m_valid = false; -} - -static const char* clientopen_error = "AUD_JackDevice: Couldn't connect to " - "jack server."; -static const char* port_error = "AUD_JackDevice: Couldn't create output port."; -static const char* activate_error = "AUD_JackDevice: Couldn't activate the " - "client."; - -AUD_JackDevice::AUD_JackDevice(std::string name, AUD_DeviceSpecs specs, int buffersize) -{ - if(specs.channels == AUD_CHANNELS_INVALID) - specs.channels = AUD_CHANNELS_STEREO; - - // jack uses floats - m_specs = specs; - m_specs.format = AUD_FORMAT_FLOAT32; - - jack_options_t options = JackNullOption; - jack_status_t status; - - // open client - m_client = AUD_jack_client_open(name.c_str(), options, &status); - if(m_client == NULL) - AUD_THROW(AUD_ERROR_JACK, clientopen_error); - - // set callbacks - AUD_jack_set_process_callback(m_client, AUD_JackDevice::jack_mix, this); - AUD_jack_on_shutdown(m_client, AUD_JackDevice::jack_shutdown, this); - AUD_jack_set_sync_callback(m_client, AUD_JackDevice::jack_sync, this); - - // register our output channels which are called ports in jack - m_ports = new jack_port_t*[m_specs.channels]; - - try - { - char portname[64]; - for(int i = 0; i < m_specs.channels; i++) - { - sprintf(portname, "out %d", i+1); - m_ports[i] = AUD_jack_port_register(m_client, portname, - JACK_DEFAULT_AUDIO_TYPE, - JackPortIsOutput, 0); - if(m_ports[i] == NULL) - AUD_THROW(AUD_ERROR_JACK, port_error); - } - } - catch(AUD_Exception&) - { - AUD_jack_client_close(m_client); - delete[] m_ports; - throw; - } - - m_specs.rate = (AUD_SampleRate)AUD_jack_get_sample_rate(m_client); - - buffersize *= sizeof(sample_t); - m_ringbuffers = new jack_ringbuffer_t*[specs.channels]; - for(unsigned int i = 0; i < specs.channels; i++) - m_ringbuffers[i] = AUD_jack_ringbuffer_create(buffersize); - buffersize *= specs.channels; - m_deinterleavebuf.resize(buffersize); - m_buffer.resize(buffersize); - - create(); - - m_valid = true; - m_sync = 0; - m_syncFunc = NULL; - m_nextState = m_state = AUD_jack_transport_query(m_client, NULL); - - pthread_mutex_init(&m_mixingLock, NULL); - pthread_cond_init(&m_mixingCondition, NULL); - - // activate the client - if(AUD_jack_activate(m_client)) - { - AUD_jack_client_close(m_client); - delete[] m_ports; - for(unsigned int i = 0; i < specs.channels; i++) - AUD_jack_ringbuffer_free(m_ringbuffers[i]); - delete[] m_ringbuffers; - pthread_mutex_destroy(&m_mixingLock); - pthread_cond_destroy(&m_mixingCondition); - destroy(); - - AUD_THROW(AUD_ERROR_JACK, activate_error); - } - - const char** ports = AUD_jack_get_ports(m_client, NULL, NULL, - JackPortIsPhysical | JackPortIsInput); - if(ports != NULL) - { - for(int i = 0; i < m_specs.channels && ports[i]; i++) - AUD_jack_connect(m_client, AUD_jack_port_name(m_ports[i]), ports[i]); - - free(ports); - } - - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - - pthread_create(&m_mixingThread, &attr, runMixingThread, this); - - pthread_attr_destroy(&attr); -} - -AUD_JackDevice::~AUD_JackDevice() -{ - if(m_valid) - AUD_jack_client_close(m_client); - m_valid = false; - - delete[] m_ports; - - pthread_mutex_lock(&m_mixingLock); - pthread_cond_signal(&m_mixingCondition); - pthread_mutex_unlock(&m_mixingLock); - pthread_join(m_mixingThread, NULL); - - pthread_cond_destroy(&m_mixingCondition); - pthread_mutex_destroy(&m_mixingLock); - for(unsigned int i = 0; i < m_specs.channels; i++) - AUD_jack_ringbuffer_free(m_ringbuffers[i]); - delete[] m_ringbuffers; - - destroy(); -} - -void AUD_JackDevice::playing(bool playing) -{ - // Do nothing. -} - -void AUD_JackDevice::startPlayback() -{ - AUD_jack_transport_start(m_client); - m_nextState = JackTransportRolling; -} - -void AUD_JackDevice::stopPlayback() -{ - AUD_jack_transport_stop(m_client); - m_nextState = JackTransportStopped; -} - -void AUD_JackDevice::seekPlayback(float time) -{ - if(time >= 0.0f) - AUD_jack_transport_locate(m_client, time * m_specs.rate); -} - -void AUD_JackDevice::setSyncCallback(AUD_syncFunction sync, void* data) -{ - m_syncFunc = sync; - m_syncFuncData = data; -} - -float AUD_JackDevice::getPlaybackPosition() -{ - jack_position_t position; - AUD_jack_transport_query(m_client, &position); - return position.frame / (float) m_specs.rate; -} - -bool AUD_JackDevice::doesPlayback() -{ - jack_transport_state_t state = AUD_jack_transport_query(m_client, NULL); - - if(state != m_state) - m_nextState = m_state = state; - - return m_nextState != JackTransportStopped; -} diff --git a/intern/audaspace/jack/AUD_JackDevice.h b/intern/audaspace/jack/AUD_JackDevice.h deleted file mode 100644 index ccf3bfd6341..00000000000 --- a/intern/audaspace/jack/AUD_JackDevice.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * Copyright 2009-2011 Jörg Hermann Müller - * - * This file is part of AudaSpace. - * - * Audaspace is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * AudaSpace 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Audaspace; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file audaspace/jack/AUD_JackDevice.h - * \ingroup audjack - */ - - -#ifndef __AUD_JACKDEVICE_H__ -#define __AUD_JACKDEVICE_H__ - - -#include "AUD_SoftwareDevice.h" -#include "AUD_Buffer.h" - -#include <string> - -#include <AUD_JackLibrary.h> - -typedef void (*AUD_syncFunction)(void*, int, float); - -/** - * This device plays back through JACK. - */ -class AUD_JackDevice : public AUD_SoftwareDevice -{ -private: - /** - * The output ports of jack. - */ - jack_port_t** m_ports; - - /** - * The jack client. - */ - jack_client_t* m_client; - - /** - * The output buffer. - */ - AUD_Buffer m_buffer; - - /** - * The deinterleaving buffer. - */ - AUD_Buffer m_deinterleavebuf; - - jack_ringbuffer_t** m_ringbuffers; - - /** - * Whether the device is valid. - */ - bool m_valid; - - /** - * Invalidates the jack device. - * \param data The jack device that gets invalidet by jack. - */ - static void jack_shutdown(void *data); - - /** - * Mixes the next bytes into the buffer. - * \param length The length in samples to be filled. - * \param data A pointer to the jack device. - * \return 0 what shows success. - */ - static int jack_mix(jack_nframes_t length, void *data); - - static int jack_sync(jack_transport_state_t state, jack_position_t* pos, void* data); - - /** - * Next JACK Transport state (-1 if not expected to change). - */ - jack_transport_state_t m_nextState; - - /** - * Current jack transport status. - */ - jack_transport_state_t m_state; - - /** - * Syncronisation state. - */ - int m_sync; - - /** - * External syncronisation callback function. - */ - AUD_syncFunction m_syncFunc; - - /** - * Data for the sync function. - */ - void* m_syncFuncData; - - /** - * The mixing thread. - */ - pthread_t m_mixingThread; - - /** - * Mutex for mixing. - */ - pthread_mutex_t m_mixingLock; - - /** - * Condition for mixing. - */ - pthread_cond_t m_mixingCondition; - - /** - * Mixing thread function. - * \param device The this pointer. - * \return NULL. - */ - static void* runMixingThread(void* device); - - /** - * Updates the ring buffers. - */ - void updateRingBuffers(); - - // hide copy constructor and operator= - AUD_JackDevice(const AUD_JackDevice&); - AUD_JackDevice& operator=(const AUD_JackDevice&); - -protected: - virtual void playing(bool playing); - -public: - /** - * Creates a JACK client for audio output. - * \param name The client name. - * \param specs The wanted audio specification, where only the channel count - * is important. - * \param buffersize The size of the internal buffer. - * \exception AUD_Exception Thrown if the audio device cannot be opened. - */ - AUD_JackDevice(std::string name, AUD_DeviceSpecs specs, int buffersize = AUD_DEFAULT_BUFFER_SIZE); - - /** - * Closes the JACK client. - */ - virtual ~AUD_JackDevice(); - - /** - * Starts jack transport playback. - */ - void startPlayback(); - - /** - * Stops jack transport playback. - */ - void stopPlayback(); - - /** - * Seeks jack transport playback. - * \param time The time to seek to. - */ - void seekPlayback(float time); - - /** - * Sets the sync callback for jack transport playback. - * \param sync The callback function. - * \param data The data for the function. - */ - void setSyncCallback(AUD_syncFunction sync, void* data); - - /** - * Retrieves the jack transport playback time. - * \return The current time position. - */ - float getPlaybackPosition(); - - /** - * Returns whether jack transport plays back. - * \return Whether jack transport plays back. - */ - bool doesPlayback(); -}; - -#endif //__AUD_JACKDEVICE_H__ diff --git a/intern/audaspace/jack/AUD_JackLibrary.cpp b/intern/audaspace/jack/AUD_JackLibrary.cpp deleted file mode 100644 index 9ed6862bbb9..00000000000 --- a/intern/audaspace/jack/AUD_JackLibrary.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * Copyright 2013 Blender Foundation - * - * This file is part of AudaSpace. - * - * Audaspace is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * AudaSpace 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Audaspace; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file audaspace/jack/AUD_JackLibrary.cpp - * \ingroup audjack - */ - -#define AUD_JACK_LIBRARY_IMPL - -#include "AUD_JackLibrary.h" - -#ifdef WITH_JACK_DYNLOAD -# include <dlfcn.h> -# include <stdio.h> -#endif - -#ifdef WITH_JACK_DYNLOAD -static void *jack_handle = NULL; -#endif - -static bool jack_supported = false; - -void AUD_jack_init(void) -{ -#ifdef WITH_JACK_DYNLOAD - const char *names[] = {"libjack.so", - "libjack.so.0", - "libjack.so.1", - "libjack.so.2", - NULL}; - int index = 0; - while (names[index] != NULL) { - jack_handle = dlopen(names[index], RTLD_LAZY); - if (jack_handle != NULL) { - // Found existing library. - break; - } - ++index; - } - - if (!jack_handle) { - return; - } - -# define JACK_SYMBOL(sym) \ - { \ - char *error; \ - *(void **) (&(AUD_##sym)) = dlsym(jack_handle, #sym); \ - if ((error = dlerror()) != NULL) { \ - fprintf(stderr, "%s\n", error); \ - return; \ - } \ - } (void)0 - - dlerror(); /* Clear any existing error */ -#else // WITH_JACK_DYNLOAD -# define JACK_SYMBOL(sym) AUD_##sym = sym -#endif // WITH_JACK_DYNLOAD - - JACK_SYMBOL(jack_transport_query); - JACK_SYMBOL(jack_transport_locate); - - JACK_SYMBOL(jack_transport_start); - JACK_SYMBOL(jack_transport_stop); - - JACK_SYMBOL(jack_ringbuffer_reset); - JACK_SYMBOL(jack_ringbuffer_write); - JACK_SYMBOL(jack_ringbuffer_write_space); - JACK_SYMBOL(jack_ringbuffer_write_advance); - JACK_SYMBOL(jack_ringbuffer_read); - JACK_SYMBOL(jack_ringbuffer_create); - JACK_SYMBOL(jack_ringbuffer_free); - JACK_SYMBOL(jack_ringbuffer_read_space); - JACK_SYMBOL(jack_set_sync_callback); - - JACK_SYMBOL(jack_port_get_buffer); - - JACK_SYMBOL(jack_client_open); - JACK_SYMBOL(jack_set_process_callback); - JACK_SYMBOL(jack_on_shutdown); - JACK_SYMBOL(jack_port_register); - JACK_SYMBOL(jack_client_close); - JACK_SYMBOL(jack_get_sample_rate); - JACK_SYMBOL(jack_activate); - JACK_SYMBOL(jack_get_ports); - JACK_SYMBOL(jack_port_name); - JACK_SYMBOL(jack_connect); - - jack_supported = true; - -#undef JACK_SYMBOL -} - -void AUD_jack_exit(void) -{ -#ifdef WITH_JACK_DYNLOAD - if (jack_handle) { - dlclose(jack_handle); - } -#endif - jack_supported = false; -} - -bool AUD_jack_supported(void) -{ - return jack_supported; -} diff --git a/intern/audaspace/jack/AUD_JackLibrary.h b/intern/audaspace/jack/AUD_JackLibrary.h deleted file mode 100644 index d74d9ba8021..00000000000 --- a/intern/audaspace/jack/AUD_JackLibrary.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * Copyright 2013 Blender Foundation - * - * This file is part of AudaSpace. - * - * Audaspace is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * AudaSpace 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Audaspace; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file audaspace/jack/AUD_JackLibrary.cpp - * \ingroup audjack - */ - -#ifndef __AUD_JACKLIBRARY__ -#define __AUD_JACKLIBRARY__ - -#if defined(__APPLE__) // always first include for jack weaklinking ! -#include <weakjack.h> -#endif - -#include <jack.h> -#include <ringbuffer.h> - -#ifdef AUD_JACK_LIBRARY_IMPL -# define JACK_SYM -#else -# define JACK_SYM extern -#endif - -/* All loadable JACK sumbols, prototypes from original jack.h */ - -JACK_SYM jack_transport_state_t (*AUD_jack_transport_query) ( - const jack_client_t *client, - jack_position_t *pos); - -JACK_SYM int (*AUD_jack_transport_locate) (jack_client_t *client, - jack_nframes_t frame); - -JACK_SYM void (*AUD_jack_transport_start) (jack_client_t *client); -JACK_SYM void (*AUD_jack_transport_stop) (jack_client_t *client); - -JACK_SYM void (*AUD_jack_ringbuffer_reset) (jack_ringbuffer_t *rb); -JACK_SYM size_t (*AUD_jack_ringbuffer_write) (jack_ringbuffer_t *rb, - const char *src, size_t cnt); -JACK_SYM size_t (*AUD_jack_ringbuffer_write_space) (const jack_ringbuffer_t *rb); -JACK_SYM void (*AUD_jack_ringbuffer_write_advance) (jack_ringbuffer_t *rb, - size_t cnt); -JACK_SYM size_t (*AUD_jack_ringbuffer_read) (jack_ringbuffer_t *rb, char *dest, - size_t cnt); -JACK_SYM jack_ringbuffer_t *(*AUD_jack_ringbuffer_create) (size_t sz); -JACK_SYM void (*AUD_jack_ringbuffer_free) (jack_ringbuffer_t *rb); -JACK_SYM size_t (*AUD_jack_ringbuffer_read_space) (const jack_ringbuffer_t *rb); -JACK_SYM int (*AUD_jack_set_sync_callback) (jack_client_t *client, - JackSyncCallback sync_callback, - void *arg); - -JACK_SYM void *(*AUD_jack_port_get_buffer) (jack_port_t *, jack_nframes_t); - -JACK_SYM jack_client_t *(*AUD_jack_client_open) (const char *client_name, - jack_options_t options, - jack_status_t *status, ...); -JACK_SYM int (*AUD_jack_set_process_callback) (jack_client_t *client, - JackProcessCallback process_callback, void *arg); -JACK_SYM void (*AUD_jack_on_shutdown) (jack_client_t *client, - JackShutdownCallback function, void *arg); -JACK_SYM jack_port_t *(*AUD_jack_port_register) (jack_client_t *client, - const char *port_name, - const char *port_type, - unsigned long flags, - unsigned long buffer_size); -JACK_SYM int (*AUD_jack_client_close) (jack_client_t *client); -JACK_SYM jack_nframes_t (*AUD_jack_get_sample_rate) (jack_client_t *); -JACK_SYM int (*AUD_jack_activate) (jack_client_t *client); -JACK_SYM const char **(*AUD_jack_get_ports) (jack_client_t *, - const char *port_name_pattern, - const char *type_name_pattern, - unsigned long flags); -JACK_SYM const char *(*AUD_jack_port_name) (const jack_port_t *port); -JACK_SYM int (*AUD_jack_connect) (jack_client_t *, - const char *source_port, - const char *destination_port); - -/* Public API */ - -void AUD_jack_init(void); -void AUD_jack_exit(void); -bool AUD_jack_supported(void); - -#endif // __AUD_JACKLIBRARY__ |