PortAudio
2.0
|
Interfaces and representation structures used by pa_front.c to manage and communicate with host API implementations. More...
#include "portaudio.h"
Go to the source code of this file.
Data Structures | |
struct | PaUtilPrivatePaFrontHostApiInfo |
struct | PaUtilHostApiSpecificStreamInfoHeader |
struct | PaUtilHostApiRepresentation |
Macros | |
#define | PA_USE_SKELETON 0 |
#define | PA_USE_ASIO 0 |
#define | PA_USE_DS 0 |
#define | PA_USE_WMME 0 |
#define | PA_USE_WASAPI 0 |
#define | PA_USE_WDMKS 0 |
#define | PA_USE_OSS 0 |
#define | PA_USE_ALSA 0 |
#define | PA_USE_JACK 0 |
#define | PA_USE_PULSEAUDIO 0 |
#define | PA_USE_SGI 0 |
#define | PA_USE_COREAUDIO 0 |
#define | PA_USE_ASIHPI 0 |
Typedefs | |
typedef struct PaUtilPrivatePaFrontHostApiInfo | PaUtilPrivatePaFrontHostApiInfo |
typedef struct PaUtilHostApiSpecificStreamInfoHeader | PaUtilHostApiSpecificStreamInfoHeader |
typedef struct PaUtilHostApiRepresentation | PaUtilHostApiRepresentation |
typedef PaError | PaUtilHostApiInitializer (PaUtilHostApiRepresentation **, PaHostApiIndex) |
Variables | |
PaUtilHostApiInitializer * | paHostApiInitializers [] |
Interfaces and representation structures used by pa_front.c to manage and communicate with host API implementations.
#define PA_USE_ALSA 0 |
#define PA_USE_ASIHPI 0 |
#define PA_USE_ASIO 0 |
#define PA_USE_COREAUDIO 0 |
#define PA_USE_DS 0 |
#define PA_USE_JACK 0 |
#define PA_USE_OSS 0 |
#define PA_USE_PULSEAUDIO 0 |
#define PA_USE_SGI 0 |
#define PA_USE_SKELETON 0 |
The PA_NO_* host API macros are now deprecated in favor of PA_USE_* macros. PA_USE_* indicates whether a particular host API will be initialized by PortAudio. An undefined or 0 value indicates that the host API will not be used. A value of 1 indicates that the host API will be used. PA_USE_* macros should be left undefined or defined to either 0 or 1.
The code below ensures that PA_USE_* macros are always defined and have value 0 or 1. Undefined symbols are defaulted to 0. Symbols that are neither 0 nor 1 are defaulted to 1.
#define PA_USE_WASAPI 0 |
#define PA_USE_WDMKS 0 |
#define PA_USE_WMME 0 |
typedef PaError PaUtilHostApiInitializer(PaUtilHostApiRepresentation **, PaHostApiIndex) |
Prototype for the initialization function which must be implemented by every host API.
This function should only return an error other than paNoError if it encounters an unexpected and fatal error (memory allocation error for example). In general, there may be conditions under which it returns a NULL interface pointer and also returns paNoError. For example, if the ASIO implementation detects that ASIO is not installed, it should return a NULL interface, and paNoError.
typedef struct PaUtilHostApiRepresentation PaUtilHostApiRepresentation |
A structure representing the interface to a host API. Contains both concrete data and pointers to functions which implement the interface.
The common header for all data structures whose pointers are passed through the hostApiSpecificStreamInfo field of the PaStreamParameters structure. Note that in order to keep the public PortAudio interface clean, this structure is not used explicitly when declaring hostApiSpecificStreamInfo data structures. However, some code in pa_front depends on the first 3 members being equivalent with this structure.
typedef struct PaUtilPrivatePaFrontHostApiInfo PaUtilPrivatePaFrontHostApiInfo |
FOR THE USE OF pa_front.c ONLY Do NOT use fields in this structure, they my change at any time. Use functions defined in pa_util.h if you think you need functionality which can be derived from here.
PaUtilHostApiInitializer* paHostApiInitializers[] |
paHostApiInitializers is a NULL-terminated array of host API initialization functions. These functions are called by pa_front.c to initialize the host APIs when the client calls Pa_Initialize().
The initialization functions are invoked in order.
The first successfully initialized host API that has a default input or output device is used as the default PortAudio host API. This is based on the logic that there is only one default host API, and it must contain the default input and output devices (if defined).
There is a platform specific file that defines paHostApiInitializers for that platform, pa_win/pa_win_hostapis.c contains the Win32 definitions for example.
Note that on Linux, ALSA is placed before OSS so that the former is preferred over the latter.