#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.
Define Documentation
#define RING_BUFFER_ADVANCE_DENOMINATOR (4) |
Typedef Documentation
Function Documentation
signed long GetStreamReadAvailable |
( |
PaStream * |
stream | ) |
|
signed long GetStreamWriteAvailable |
( |
PaStream * |
stream | ) |
|
PaError ReadStream |
( |
PaStream * |
stream, |
|
|
void * |
buffer, |
|
|
unsigned long |
frames |
|
) |
| |
- Todo:
- REVIEW: consider what to do if the input overflows. do we requeue all of the buffers? should we be running a thread to make sure they are always queued?
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.
PaError WriteStream |
( |
PaStream * |
stream, |
|
|
const void * |
buffer, |
|
|
unsigned long |
frames |
|
) |
| |
- Todo:
- REVIEW: consider what to do if the output underflows. do we requeue all the existing buffers with zeros? should we run a separate thread to keep the buffers enqueued at all times?
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().