PortAudio
2.0
|
#include <string.h>
#include <regex.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <semaphore.h>
#include <jack/types.h>
#include <jack/jack.h>
#include "pa_util.h"
#include "pa_hostapi.h"
#include "pa_stream.h"
#include "pa_process.h"
#include "pa_allocation.h"
#include "pa_cpuload.h"
#include "pa_ringbuffer.h"
#include "pa_debugprint.h"
Data Structures | |
struct | PaJackHostApiRepresentation |
struct | PaJackStream |
Macros | |
#define | STRINGIZE_HELPER(expr) #expr |
#define | STRINGIZE(expr) STRINGIZE_HELPER(expr) |
#define | ENSURE_PA(expr) |
#define | UNLESS(expr, code) |
#define | ASSERT_CALL(expr, success) |
#define | JACK_PORT_TYPE_FILTER "audio" |
#define | TRUE 1 |
#define | FALSE 0 |
#define | ABS(x) ( (x) > 0 ? (x) : -(x) ) |
#define | ABS(x) ( (x) > 0 ? (x) : -(x) ) |
Typedefs | |
typedef struct PaJackStream | PaJackStream |
Functions | |
PaError | PaJack_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex) |
PaError | PaJack_SetClientName (const char *name) |
PaError | PaJack_GetClientName (const char **clientName) |
#define ABS | ( | x | ) | ( (x) > 0 ? (x) : -(x) ) |
#define ABS | ( | x | ) | ( (x) > 0 ? (x) : -(x) ) |
#define ASSERT_CALL | ( | expr, | |
success | |||
) |
Referenced by PaJack_Initialize().
#define ENSURE_PA | ( | expr | ) |
Referenced by PaJack_GetClientName(), and PaJack_Initialize().
#define FALSE 0 |
#define JACK_PORT_TYPE_FILTER "audio" |
#define STRINGIZE | ( | expr | ) | STRINGIZE_HELPER(expr) |
#define STRINGIZE_HELPER | ( | expr | ) | #expr |
#define TRUE 1 |
#define UNLESS | ( | expr, | |
code | |||
) |
Referenced by PaJack_Initialize().
typedef struct PaJackStream PaJackStream |
PaError PaJack_GetClientName | ( | const char ** | clientName | ) |
Get the JACK client name used by PA JACK.
The caller is responsible for freeing the returned pointer.
References ENSURE_PA, PaJackHostApiRepresentation::jack_client, paJACK, paNoError, and PaUtil_GetHostApiRepresentation().
PaError PaJack_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | hostApiIndex | ||
) |
References ASSERT_CALL, PaJackHostApiRepresentation::blockingStreamInterface, PaJackHostApiRepresentation::callbackStreamInterface, PaJackHostApiRepresentation::commonHostApiRep, PaJackHostApiRepresentation::cond, PaJackHostApiRepresentation::deviceInfoMemory, ENSURE_PA, PaJackHostApiRepresentation::hostApiIndex, PaUtilHostApiRepresentation::info, PaJackHostApiRepresentation::inputBase, PaJackHostApiRepresentation::jack_buffer_size, PaJackHostApiRepresentation::jack_client, PaJackHostApiRepresentation::jackIsDown, PaJackHostApiRepresentation::mtx, PaJackHostApiRepresentation::outputBase, PA_DEBUG, paInsufficientMemory, paJACK, paNoError, paUnanticipatedHostError, PaUtil_AllocateMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_FreeMemory(), PaUtil_InitializeStreamInterface(), PaJackHostApiRepresentation::processQueue, PaHostApiInfo::structVersion, PaJackHostApiRepresentation::toAdd, PaJackHostApiRepresentation::toRemove, UNLESS, and PaJackHostApiRepresentation::xrun.
PaError PaJack_SetClientName | ( | const char * | name | ) |
Set the JACK client name.
During Pa_Initialize, When PA JACK connects as a client of the JACK server, it requests a certain name, which is for instance prepended to port names. By default this name is "PortAudio". The JACK server may append a suffix to the client name, in order to avoid clashes among clients that try to connect with the same name (e.g., different PA JACK clients).
This function must be called before Pa_Initialize, otherwise it won't have any effect. Note that the string is not copied, but instead referenced directly, so it must not be freed for as long as PA might need it.
References paInvalidFlag, and paNoError.