#include <AudioUnit/AudioUnit.h>
#include <AudioToolbox/AudioToolbox.h>
#include "portaudio.h"
#include "pa_util.h"
#include "pa_hostapi.h"
#include "pa_stream.h"
#include "pa_allocation.h"
#include "pa_cpuload.h"
#include "pa_process.h"
#include "pa_ringbuffer.h"
#include "pa_mac_core_blocking.h"
Go to the source code of this file.
Data Structures | |
struct | PaMacAUHAL |
struct | PaMacCoreStream |
Defines | |
#define | RING_BUFFER_ADVANCE_DENOMINATOR (4) |
Functions | |
PaError | PaMacCore_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index) |
PaError | ReadStream (PaStream *stream, void *buffer, unsigned long frames) |
PaError | WriteStream (PaStream *stream, const void *buffer, unsigned long frames) |
signed long | GetStreamReadAvailable (PaStream *stream) |
signed long | GetStreamWriteAvailable (PaStream *stream) |
#define RING_BUFFER_ADVANCE_DENOMINATOR (4) |
signed long GetStreamReadAvailable | ( | PaStream * | stream | ) |
Number of frames that can be read from input stream without blocking.
s | Pointer to PortAudio stream |
References GetStreamReadAvailable(), PaMacBlio::inputRingBuffer, PaMacBlio::outChan, PaMacBlio::outputSampleSizeActual, PaUtil_GetRingBufferReadAvailable(), and VVDBUG.
signed long GetStreamWriteAvailable | ( | PaStream * | stream | ) |
Number of frames that can be written to output stream without blocking.
s | Pointer to PortAudio stream |
References GetStreamWriteAvailable(), PaMacBlio::outChan, PaMacBlio::outputRingBuffer, PaMacBlio::outputSampleSizeActual, PaUtil_GetRingBufferWriteAvailable(), and VVDBUG.
PaError PaMacCore_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, | |
PaHostApiIndex | index | |||
) |
Read data from input stream. This reads the indicated number of frames into the supplied buffer from an input stream, and blocks until this is done.
s | Pointer to PortAudio stream | |
buffer | Pointer to buffer that will receive interleaved data (or an array of pointers to a buffer for each non-interleaved channel) | |
frames | Number of frames to read from stream |
References PaMacBlio::inChan, PaMacBlio::inputRingBuffer, PaMacBlio::inputSampleSizeActual, MIN, PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL, Pa_Sleep(), paInputOverflow, paInputOverflowed, paNoError, PaUtil_GetRingBufferReadAvailable(), PaUtil_ReadRingBuffer(), ReadStream(), PaMacBlio::statusFlags, UNIX_ERR, and VVDBUG.
Write data to output stream. This writes the indicated number of frames from the supplied buffer to an output stream, and blocks until this is done.
s | Pointer to PortAudio stream | |
buffer | Pointer to buffer that provides interleaved data (or an array of pointers to a buffer for each non-interleaved channel) | |
frames | Number of frames to write to stream |
References MIN, PaMacBlio::outChan, PaMacBlio::outputRingBuffer, PaMacBlio::outputSampleSizeActual, PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL, Pa_Sleep(), paNoError, paOutputUnderflow, paOutputUnderflowed, PaUtil_GetRingBufferWriteAvailable(), PaUtil_WriteRingBuffer(), PaMacBlio::statusFlags, UNIX_ERR, VVDBUG, and WriteStream().