|
AudioBufferList * | TPCircularBufferPrepareEmptyAudioBufferList (TPCircularBuffer *buffer, int numberOfBuffers, int bytesPerBuffer, const AudioTimeStamp *timestamp) |
| Prepare an empty buffer list, stored on the circular buffer.
|
|
AudioBufferList * | TPCircularBufferPrepareEmptyAudioBufferListWithAudioFormat (TPCircularBuffer *buffer, const AudioStreamBasicDescription *audioFormat, UInt32 frameCount, const AudioTimeStamp *timestamp) |
| Prepare an empty buffer list, stored on the circular buffer, using an audio description to automatically configure buffer.
|
|
void | TPCircularBufferProduceAudioBufferList (TPCircularBuffer *buffer, const AudioTimeStamp *inTimestamp) |
| Mark next audio buffer list as ready for reading.
|
|
bool | TPCircularBufferCopyAudioBufferList (TPCircularBuffer *buffer, const AudioBufferList *bufferList, const AudioTimeStamp *timestamp, UInt32 frames, const AudioStreamBasicDescription *audioFormat) |
| Copy the audio buffer list onto the buffer.
|
|
| if (!block) |
|
| if (outTimestamp) |
|
AudioBufferList * | TPCircularBufferNextBufferListAfter (TPCircularBuffer *buffer, const AudioBufferList *bufferList, AudioTimeStamp *outTimestamp) |
| Get a pointer to the next stored buffer list after the given one.
|
|
void | TPCircularBufferConsumeNextBufferListPartial (TPCircularBuffer *buffer, int framesToConsume, const AudioStreamBasicDescription *audioFormat) |
| Consume a portion of the next buffer list.
|
|
void | TPCircularBufferDequeueBufferListFrames (TPCircularBuffer *buffer, UInt32 *ioLengthInFrames, const AudioBufferList *outputBufferList, AudioTimeStamp *outTimestamp, const AudioStreamBasicDescription *audioFormat) |
| Consume a certain number of frames from the buffer, possibly from multiple queued buffer lists.
|
|
UInt32 | TPCircularBufferPeek (TPCircularBuffer *buffer, AudioTimeStamp *outTimestamp, const AudioStreamBasicDescription *audioFormat) |
| Determine how many frames of audio are buffered.
|
|
UInt32 | TPCircularBufferPeekContiguous (TPCircularBuffer *buffer, AudioTimeStamp *outTimestamp, const AudioStreamBasicDescription *audioFormat, UInt32 contiguousToleranceSampleTime) |
| Determine how many contiguous frames of audio are buffered.
|
|
UInt32 | TPCircularBufferPeekContiguousWrapped (TPCircularBuffer *buffer, AudioTimeStamp *outTimestamp, const AudioStreamBasicDescription *audioFormat, UInt32 contiguousToleranceSampleTime, UInt32 wrapPoint) |
| Determine how many contiguous frames of audio are buffered, with wrap around.
|
|
UInt32 | TPCircularBufferGetAvailableSpace (TPCircularBuffer *buffer, const AudioStreamBasicDescription *audioFormat) |
| Determine how many much space there is in the buffer.
|
|
void TPCircularBufferDequeueBufferListFrames |
( |
TPCircularBuffer * |
buffer, |
|
|
UInt32 * |
ioLengthInFrames, |
|
|
const AudioBufferList * |
outputBufferList, |
|
|
AudioTimeStamp * |
outTimestamp, |
|
|
const AudioStreamBasicDescription * |
audioFormat |
|
) |
| |
Consume a certain number of frames from the buffer, possibly from multiple queued buffer lists.
Copies the given number of frames from the buffer into outputBufferList, of the given audio description, then consumes the audio buffers. If an audio buffer has not been entirely consumed, then updates the queued buffer list structure to point to the unconsumed data only.
- Parameters
-
buffer | Circular buffer |
ioLengthInFrames | On input, the number of frames in the given audio format to consume; on output, the number of frames provided |
outputBufferList | The buffer list to copy audio to, or NULL to discard audio. If not NULL, the structure must be initialised properly, and the mData pointers must not be NULL. |
outTimestamp | On output, if not NULL, the timestamp corresponding to the first audio frame returned |
audioFormat | The format of the audio stored in the buffer |
UInt32 TPCircularBufferPeekContiguous |
( |
TPCircularBuffer * |
buffer, |
|
|
AudioTimeStamp * |
outTimestamp, |
|
|
const AudioStreamBasicDescription * |
audioFormat, |
|
|
UInt32 |
contiguousToleranceSampleTime |
|
) |
| |
Determine how many contiguous frames of audio are buffered.
Given the provided audio format, determines the frame count of all queued buffers that are contiguous, given their corresponding timestamps (sample time).
Note: This function should only be used on the consumer thread, not the producer thread.
- Parameters
-
buffer | Circular buffer |
outTimestamp | On output, if not NULL, the timestamp corresponding to the first audio frame |
audioFormat | The format of the audio stored in the buffer |
contiguousToleranceSampleTime | The number of samples of discrepancy to tolerate |
- Returns
- The number of frames in the given audio format that are in the buffer
UInt32 TPCircularBufferPeekContiguousWrapped |
( |
TPCircularBuffer * |
buffer, |
|
|
AudioTimeStamp * |
outTimestamp, |
|
|
const AudioStreamBasicDescription * |
audioFormat, |
|
|
UInt32 |
contiguousToleranceSampleTime, |
|
|
UInt32 |
wrapPoint |
|
) |
| |
Determine how many contiguous frames of audio are buffered, with wrap around.
Like TPCircularBufferPeekContiguous, determines how many contiguous frames are buffered, but considers audio that wraps around a region of a given length as also contiguous. This is good for audio that loops.
Note: This function should only be used on the consumer thread, not the producer thread.
- Parameters
-
buffer | Circular buffer |
outTimestamp | On output, if not NULL, the timestamp corresponding to the first audio frame |
audioFormat | The format of the audio stored in the buffer |
contiguousToleranceSampleTime | The number of samples of discrepancy to tolerate |
wrapPoint | The point around which the audio may wrap and still be considered contiguous, or 0 to disable |
- Returns
- The number of frames in the given audio format that are in the buffer