Universal converter to float format.
More...
#import <AEFloatConverter.h>
Inherits <NSObject>.
Universal converter to float format.
Use this class to easily convert arbitrary audio formats to floating point for use with utilities like the Accelerate framework.
| - (id) initWithSourceFormat: |
|
(AudioStreamBasicDescription) |
sourceFormat |
|
Initialize.
- Parameters
-
| sourceFormat | The audio format to use |
| - (BOOL) AEFloatConverterToFloat |
|
(AEFloatConverter *) |
converter |
|
|
(AudioBufferList *) |
sourceBuffer |
|
|
(float *const *) |
targetBuffers |
|
|
(UInt32) |
frames |
|
|
| |
Convert audio to floating-point.
This C function, safe to use in a Core Audio realtime thread context, will take an audio buffer list of audio in the format you provided at initialisation, and convert it into a noninterleaved float array.
- Parameters
-
| converter | Pointer to the converter object. |
| sourceBuffer | An audio buffer list containing the source audio. |
| targetBuffers | An array of floating-point arrays to store the converted float audio into. Note that you must provide the correct number of arrays, to match the number of channels. |
| frames | The number of frames to convert. |
- Returns
- YES on success; NO on failure
| - (BOOL) AEFloatConverterToFloatBufferList |
|
(AEFloatConverter *) |
converter |
|
|
(AudioBufferList *) |
sourceBuffer |
|
|
(AudioBufferList *) |
targetBuffer |
|
|
(UInt32) |
frames |
|
|
| |
Convert audio to floating-point, in a buffer list.
This C function, safe to use in a Core Audio realtime thread context, will take an audio buffer list of audio in the format you provided at initialisation, and convert it into a noninterleaved float format.
- Parameters
-
| converter | Pointer to the converter object. |
| sourceBuffer | An audio buffer list containing the source audio. |
| targetBuffer | An audio buffer list to store the converted floating-point audio. |
| frames | The number of frames to convert. |
- Returns
- YES on success; NO on failure
| - (BOOL) AEFloatConverterFromFloat |
|
(AEFloatConverter *) |
converter |
|
|
(float *const *) |
sourceBuffers |
|
|
(AudioBufferList *) |
targetBuffer |
|
|
(UInt32) |
frames |
|
|
| |
Convert audio from floating-point.
This C function, safe to use in a Core Audio realtime thread context, will take an audio buffer list of audio in the format you provided at initialisation, and convert it into a float array.
- Parameters
-
| converter | Pointer to the converter object. |
| sourceBuffers | An array of floating-point arrays containing the floating-point audio to convert. Note that you must provide the correct number of arrays, to match the number of channels. |
| targetBuffer | An audio buffer list to store the converted audio into. |
| frames | The number of frames to convert. |
- Returns
- YES on success; NO on failure
| - (BOOL) AEFloatConverterFromFloatBufferList |
|
(AEFloatConverter *) |
converter |
|
|
(AudioBufferList *) |
sourceBuffer |
|
|
(AudioBufferList *) |
targetBuffer |
|
|
(UInt32) |
frames |
|
|
| |
Convert audio from floating-point, in a buffer list.
This C function, safe to use in a Core Audio realtime thread context, will take an audio buffer list of audio in the format you provided at initialisation, and convert it into a float array.
- Parameters
-
| converter | Pointer to the converter object. |
| sourceBuffer | An audio buffer list containing the source audio. |
| targetBuffer | An audio buffer list to store the converted audio into. |
| frames | The number of frames to convert. |
- Returns
- YES on success; NO on failure
| - (AudioStreamBasicDescription) floatingPointAudioDescription |
|
readnonatomicassign |
The AudioStreamBasicDescription representing the converted floating-point format.
| - (AudioStreamBasicDescription) sourceFormat |
|
readwritenonatomicassign |
The source audio format set at initialization.
| - (int) floatFormatChannelsPerFrame |
|
readwritenonatomicassign |
The number of channels for the floating-point format.
The documentation for this class was generated from the following file: