PortAudio
2.0
|
#include "pa_hostapi.h"
Functions | |
PaError | PaJack_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaPulseAudio_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaAlsa_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaSndio_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaOSS_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaAudioIO_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaSGI_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaAsiHpi_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaMacCore_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | PaSkeleton_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
Variables | |
PaUtilHostApiInitializer * | paHostApiInitializers [] |
PaError PaAlsa_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | hostApiIndex | ||
) |
Uncommented because AlsaErrorHandler is unused for anything good yet. If AlsaErrorHandler is to be used, do not forget to register this callback in PaAlsa_Initialize, and unregister in Terminate.
If AlsaErrorHandler is to be used, do not forget to unregister callback pointer in Terminate function.
References PaAlsaHostApiRepresentation::allocations, PaAlsaHostApiRepresentation::alsaLibVersion, PaAlsaHostApiRepresentation::blockingStreamInterface, PaAlsaHostApiRepresentation::callbackStreamInterface, PaAlsaHostApiRepresentation::hostApiIndex, PA_ENSURE, PA_UNLESS, paALSA, paHostApiNotFound, paInsufficientMemory, paNoError, PaUnixThreading_Initialize(), PaUtil_AllocateZeroInitializedMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_FreeMemory(), and PaUtil_InitializeStreamInterface().
PaError PaAsiHpi_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
Initialize host API implementation. This is the only function exported beyond this file. It is called by PortAudio to initialize the host API. It stores API info, finds and registers all devices, and sets up callback and blocking interfaces.
hostApi | Pointer to host API struct |
hostApiIndex | Index of current (HPI) host API |
References PaAsiHpiHostApiRepresentation::allocations, PaAsiHpiHostApiRepresentation::baseHostApiRep, PaAsiHpiHostApiRepresentation::blockingStreamInterface, PaAsiHpiHostApiRepresentation::callbackStreamInterface, PaHostApiInfo::defaultInputDevice, PaHostApiInfo::defaultOutputDevice, PaHostApiInfo::deviceCount, PaAsiHpiHostApiRepresentation::hostApiIndex, PaHostApiInfo::name, PA_ASIHPI_UNLESS_, PA_DEBUG, PA_ENSURE_, PA_UNLESS_, paAudioScienceHPI, paInsufficientMemory, paNoDevice, paNoError, paUnanticipatedHostError, PaUnixThreading_Initialize(), PaUtil_AllocateZeroInitializedMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeMemory(), PaUtil_InitializeStreamInterface(), PaHostApiInfo::structVersion, and PaHostApiInfo::type.
PaError PaAudioIO_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
References PaAudioIOHostApiRepresentation::allocations, AUDIO_ENCODING_SLINEAR, AUDIO_GETBUFINFO, AUDIOIO_DEFAULT_MAX_CHANNELS, AUDIOIO_DEV_DEFAULT, AUDIOIO_DEV_PREFIX, AUDIOIO_MAX_DEVICES, PaAudioIOHostApiRepresentation::blockingStreamInterface, PaAudioIOHostApiRepresentation::callbackStreamInterface, PaDeviceInfo::defaultHighInputLatency, PaDeviceInfo::defaultHighOutputLatency, PaHostApiInfo::defaultInputDevice, PaDeviceInfo::defaultLowInputLatency, PaDeviceInfo::defaultLowOutputLatency, PaHostApiInfo::defaultOutputDevice, PaDeviceInfo::defaultSampleRate, PaHostApiInfo::deviceCount, PaUtilHostApiRepresentation::deviceInfos, PaDeviceInfo::hostApi, PaUtilHostApiRepresentation::info, PaAudioIOHostApiRepresentation::inheritedHostApiRep, PaUtilHostApiRepresentation::IsFormatSupported, PaDeviceInfo::maxInputChannels, PaDeviceInfo::maxOutputChannels, PaHostApiInfo::name, PaDeviceInfo::name, PaUtilHostApiRepresentation::OpenStream, PA_UNLESS, paAudioIO, paInsufficientMemory, paNoDevice, paNoError, PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_GroupAllocateZeroInitializedMemory(), PaUtil_InitializeStreamInterface(), PaHostApiInfo::structVersion, PaDeviceInfo::structVersion, PaUtilHostApiRepresentation::Terminate, and PaHostApiInfo::type.
PaError PaJack_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
PaError PaMacCore_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
References PaMacAUHAL::allocations, PaMacAUHAL::blockingStreamInterface, PaMacAUHAL::callbackStreamInterface, PaMacAUHAL::defaultIn, PaMacAUHAL::defaultOut, PaMacAUHAL::devCount, PaMacAUHAL::devIds, GetStreamReadAvailable(), GetStreamWriteAvailable(), PaUtilHostApiRepresentation::info, PaMacAUHAL::inheritedHostApiRep, initializeXRunListenerList(), PaUtilHostApiRepresentation::IsFormatSupported, PaUtilHostApiRepresentation::OpenStream, paCoreAudio, paInsufficientMemory, paNoDevice, paNoError, PaUtil_AllocateZeroInitializedMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_FreeMemory(), PaUtil_GroupAllocateZeroInitializedMemory(), PaUtil_InitializeStreamInterface(), ReadStream(), PaHostApiInfo::structVersion, PaUtilHostApiRepresentation::Terminate, UNIX_ERR, VVDBUG, and WriteStream().
PaError PaOSS_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | hostApiIndex | ||
) |
Initialize the OSS API implementation.
This function will initialize host API datastructures and query host devices for information.
Aspect DeviceCapabilities: Enumeration of host API devices is initiated from here
Aspect FreeResources: If an error is encountered under way we have to free each resource allocated in this function, this happens with the usual "error" label.
References PaOSSHostApiRepresentation::allocations, PaOSSHostApiRepresentation::blockingStreamInterface, PaOSSHostApiRepresentation::callbackStreamInterface, GetStreamReadAvailable(), GetStreamWriteAvailable(), PaOSSHostApiRepresentation::hostApiIndex, PaUtilHostApiRepresentation::info, PaOSSHostApiRepresentation::inheritedHostApiRep, PA_ENSURE, PA_UNLESS, paInsufficientMemory, paNoError, paOSS, PaUtil_AllocateZeroInitializedMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_FreeMemory(), PaUtil_InitializeStreamInterface(), ReadStream(), PaHostApiInfo::structVersion, and WriteStream().
PaError PaPulseAudio_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
References _PaPulseAudio_AddAudioDevice(), PaPulseAudio_HostApiRepresentation::allocations, PaPulseAudio_HostApiRepresentation::blockingStreamInterface, PaPulseAudio_HostApiRepresentation::callbackStreamInterface, PaPulseAudio_HostApiRepresentation::context, PaHostApiInfo::defaultInputDevice, PaHostApiInfo::defaultOutputDevice, PaPulseAudio_HostApiRepresentation::deviceCount, PaPulseAudio_HostApiRepresentation::deviceInfoArray, GetStreamCpuLoad(), GetStreamTime(), PaPulseAudio_HostApiRepresentation::hostApiIndex, PaUtilHostApiRepresentation::info, PaPulseAudio_HostApiRepresentation::inheritedHostApiRep, IsFormatSupported(), IsStreamActive(), IsStreamStopped(), PaPulseAudio_HostApiRepresentation::mainloop, OpenStream(), PA_DEBUG, PA_PULSEAUDIO_DEFAULT_MAX_LATENCY, PA_PULSEAUDIO_DEFAULT_MIN_LATENCY, PA_PULSEAUDIO_SET_LAST_HOST_ERROR, paInsufficientMemory, paNoDevice, paNoError, paPulseAudio, PaPulseAudio_AbortStreamCb(), PaPulseAudio_CheckConnection(), PaPulseAudio_CloseStreamCb(), PaPulseAudio_Free(), PaPulseAudio_GetStreamReadAvailableBlock(), PaPulseAudio_Lock(), PAPULSEAUDIO_MAX_DEVICECOUNT, PaPulseAudio_New(), PaPulseAudio_ReadStreamBlock(), PaPulseAudio_ReleaseOperation(), PaPulseAudio_ServerInfoCb(), PaPulseAudio_SinkListCb(), PaPulseAudio_SourceListCb(), PaPulseAudio_StartStreamCb(), PaPulseAudio_StopStreamCb(), PaPulseAudio_UnLock(), PaPulseAudio_WriteStreamBlock(), paUnanticipatedHostError, PaUtil_CreateAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_GroupAllocateZeroInitializedMemory(), PaUtil_InitializeStreamInterface(), PaPulseAudio_HostApiRepresentation::pulseaudioDefaultSampleSpec, PaPulseAudio_HostApiRepresentation::pulseaudioDeviceNames, PaHostApiInfo::structVersion, and Terminate().
PaError PaSGI_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
PaError PaSkeleton_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
PaError PaSndio_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | index | ||
) |
References PaSndioHostApiRepresentation::audioDevices, PaSndioHostApiRepresentation::base, PaSndioHostApiRepresentation::blocking, PaSndioHostApiRepresentation::callback, PaSndioHostApiRepresentation::deviceInfoPtrs, PaSndioHostApiRepresentation::deviceInfos, GetStreamTime(), PaUtilHostApiRepresentation::info, IsFormatSupported(), IsStreamActive(), IsStreamStopped(), OpenStream(), PA_DEBUG, PA_SNDIO_AUDIODEVICES_MAX, paNoError, paSndio, PaUtil_AllocateZeroInitializedMemory(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_InitializeStreamInterface(), PaHostApiInfo::structVersion, and Terminate().
PaUtilHostApiInitializer* paHostApiInitializers[] |
Note that on Linux, ALSA is placed before OSS so that the former is preferred over the latter.