PortAudio
2.0
|
PulseAudio implementation of support for a host API. More...
#include "pa_util.h"
#include "pa_allocation.h"
#include "pa_hostapi.h"
#include "pa_stream.h"
#include "pa_cpuload.h"
#include "pa_process.h"
#include "pa_unix_util.h"
#include "pa_ringbuffer.h"
#include "pa_linux_pulseaudio_cb_internal.h"
#include <string.h>
#include <unistd.h>
PulseAudio implementation of support for a host API.
This host API implements PulseAudio support for portaudio it has callback mode and normal write mode support
void _PaPulseAudio_Read | ( | PaPulseAudio_Stream * | stream, |
size_t | length | ||
) |
References _PaPulseAudio_WriteRingBuffer(), PaPulseAudio_Stream::inputRing, PaPulseAudio_Stream::inputStream, and PA_DEBUG.
Referenced by PaPulseAudio_StreamRecordCb().
PaError _PaPulseAudio_WaitStreamState | ( | pa_threaded_mainloop * | mainloop, |
pa_stream * | stream | ||
) |
References PA_DEBUG, paNoError, paNotInitialized, PaPulseAudio_Lock(), and PaPulseAudio_UnLock().
Referenced by PaPulseAudio_StartStreamCb().
void _PaPulseAudio_WriteRingBuffer | ( | PaUtilRingBuffer * | ringbuffer, |
const void * | buffer, | ||
size_t | length | ||
) |
References PaUtil_GetRingBufferWriteAvailable(), PaUtil_ReadRingBuffer(), PaUtil_WriteRingBuffer(), and PULSEAUDIO_BUFFER_SIZE.
Referenced by _PaPulseAudio_Read().
Referenced by PaPulseAudio_Initialize(), and PaPulseAudio_StartStreamCb().
References PaPulseAudio_Stream::bufferProcessor, PaPulseAudio_Stream::hostapi, PaPulseAudio_Stream::inputStream, PaPulseAudio_Stream::inputStreamName, PaPulseAudio_Stream::isActive, PaPulseAudio_Stream::isStopped, PaPulseAudio_Stream::mainloop, PaPulseAudio_Stream::outputStream, PaPulseAudio_Stream::outputStreamName, paNoError, PaPulseAudio_Lock(), PaPulseAudio_ReleaseOperation(), PaPulseAudio_UnLock(), PaUtil_FreeMemory(), PaUtil_TerminateBufferProcessor(), PaUtil_TerminateStreamRepresentation(), PaPulseAudio_Stream::pulseaudioIsActive, PaPulseAudio_Stream::pulseaudioIsStopped, and PaPulseAudio_Stream::streamRepresentation.
Referenced by PaPulseAudio_Initialize().
void PaPulseAudio_Lock | ( | pa_threaded_mainloop * | mainloop | ) |
Referenced by _PaPulseAudio_WaitStreamState(), GetStreamTime(), OpenStream(), PaPulseAudio_CloseStreamCb(), PaPulseAudio_Initialize(), PaPulseAudio_ReadStreamBlock(), PaPulseAudio_ReleaseOperation(), PaPulseAudio_RenameSink(), PaPulseAudio_RenameSource(), PaPulseAudio_StartStreamCb(), PaPulseAudio_WriteStreamBlock(), and Terminate().
void PaPulseAudio_ReleaseOperation | ( | PaPulseAudio_HostApiRepresentation * | hostapi, |
pa_operation ** | operation | ||
) |
References _PaPulseAudio_WaitStreamState(), PaPulseAudio_Stream::bufferProcessor, PaHostApiInfo::defaultInputDevice, PaHostApiInfo::defaultOutputDevice, PaPulseAudio_Stream::hostapi, PaUtilHostApiRepresentation::info, PaPulseAudio_HostApiRepresentation::inheritedHostApiRep, PaPulseAudio_Stream::inputBufferAttr, PaPulseAudio_Stream::inputDevice, PaPulseAudio_Stream::inputSampleSpec, PaPulseAudio_Stream::inputStream, PaPulseAudio_Stream::isActive, PaPulseAudio_Stream::isStopped, PaPulseAudio_HostApiRepresentation::mainloop, PaPulseAudio_Stream::missedBytes, PaPulseAudio_Stream::outputBufferAttr, PaPulseAudio_Stream::outputDevice, PaPulseAudio_Stream::outputSampleSpec, PaPulseAudio_Stream::outputStream, PaPulseAudio_Stream::outputUnderflows, PA_DEBUG, paNoDevice, paNoError, paNotInitialized, PaPulseAudio_AbortStreamCb(), PaPulseAudio_Lock(), PaPulseAudio_ReleaseOperation(), PaPulseAudio_StreamPlaybackCb(), PaPulseAudio_StreamRecordCb(), PaPulseAudio_UnLock(), PaUtil_DeviceIndexToHostApiDeviceIndex(), PaUtil_ResetBufferProcessor(), PaPulseAudio_HostApiRepresentation::pulseaudioDeviceNames, PaPulseAudio_Stream::pulseaudioIsActive, PaPulseAudio_Stream::pulseaudioIsStopped, and PaPulseAudio_Stream::suggestedLatencyUSecs.
Referenced by PaPulseAudio_Initialize().
Referenced by PaPulseAudio_Initialize().
void PaPulseAudio_StreamPlaybackCb | ( | pa_stream * | s, |
size_t | length, | ||
void * | userdata | ||
) |
References PaPulseAudio_Stream::bufferProcessor, PaPulseAudio_Stream::mainloop, and PaUtilBufferProcessor::streamCallback.
Referenced by PaPulseAudio_StartStreamCb().
void PaPulseAudio_StreamRecordCb | ( | pa_stream * | s, |
size_t | length, | ||
void * | userdata | ||
) |
References _PaPulseAudio_Read(), PaPulseAudio_Stream::bufferProcessor, PaPulseAudio_Stream::mainloop, and PaUtilBufferProcessor::streamCallback.
Referenced by PaPulseAudio_StartStreamCb().
void PaPulseAudio_StreamStartedCb | ( | pa_stream * | stream, |
void * | userdata | ||
) |
References PaPulseAudio_Stream::mainloop.
Referenced by OpenStream().
void PaPulseAudio_UnLock | ( | pa_threaded_mainloop * | mainloop | ) |
Referenced by _PaPulseAudio_WaitStreamState(), GetStreamTime(), OpenStream(), PaPulseAudio_CloseStreamCb(), PaPulseAudio_Initialize(), PaPulseAudio_ReadStreamBlock(), PaPulseAudio_ReleaseOperation(), PaPulseAudio_RenameSink(), PaPulseAudio_RenameSource(), PaPulseAudio_StartStreamCb(), PaPulseAudio_WriteStreamBlock(), and Terminate().
int PaPulseAudio_updateTimeInfo | ( | pa_stream * | s, |
PaStreamCallbackTimeInfo * | timeInfo, | ||
int | record | ||
) |
References PaStreamCallbackTimeInfo::currentTime, PaStreamCallbackTimeInfo::inputBufferAdcTime, and PaStreamCallbackTimeInfo::outputBufferDacTime.
Referenced by GetStreamTime().