Maintains an open audio file and allows loading data from that file into new ALBuffer objects.
More...
#import <OALAudioFile.h>
Maintains an open audio file and allows loading data from that file into new ALBuffer objects.
- (void *) audioDataWithStartFrame: |
|
(SInt64) |
startFrame |
numFrames: |
|
(SInt64) |
numFrames |
bufferSize: |
|
(UInt32*) |
bufferSize |
|
|
| |
Read audio data from this file into a new buffer.
- Parameters
-
startFrame | The starting audio frame to read data from. |
numFrames | The number of frames to read. |
bufferSize | On successful return, contains the size of the returned buffer, in bytes. |
- Returns
- The audio data or nil on error. You are responsible for calling free() on the data.
+ (ALBuffer *) bufferFromUrl: |
|
(NSURL*) |
url |
reduceToMono: |
|
(bool) |
reduceToMono |
|
|
| |
Convenience method to load the entire contents of a URL into a new ALBuffer.
- Parameters
-
url | The URL to open the audio file from. |
reduceToMono | If YES, reduce any stereo track to mono (stereo samples don't support panning or positional audio). |
- Returns
- an ALBuffer object.
- (ALBuffer *) bufferNamed: |
|
(NSString*) |
name |
startFrame: |
|
(SInt64) |
startFrame |
numFrames: |
|
(SInt64) |
numFrames |
|
|
| |
Create a new ALBuffer with the contents of this file.
- Parameters
-
name | The name to be given to this ALBuffer. |
startFrame | The starting audio frame to read data from. |
numFrames | The number of frames to read. |
- Returns
- a new ALBuffer containing the audio data.
+ (OALAudioFile *) fileWithUrl: |
|
(NSURL*) |
url |
reduceToMono: |
|
(bool) |
reduceToMono |
|
|
| |
Open the audio file at the specified URL.
- Parameters
-
url | The URL to open the audio file from. |
reduceToMono | If YES, reduce any stereo track to mono (stereo samples don't support panning or positional audio). |
- Returns
- a new audio file object.
- (id) initWithUrl: |
|
(NSURL*) |
url |
reduceToMono: |
|
(bool) |
reduceToMono |
|
|
| |
Initialize this object with the audio file at the specified URL.
- Parameters
-
url | The URL to open the audio file from. |
reduceToMono | If YES, reduce any stereo track to mono (stereo samples don't support panning or positional audio). |
- Returns
- the initialized audio file object.
- (ExtAudioFileRef) fileHandle |
|
protected |
The OS specific file handle.
- (UInt32) originalChannelsPerFrame |
|
protected |
The actual number of channels in the audio data if not reducing to mono.
- (AudioStreamBasicDescription) streamDescription |
|
protected |
A description of the audio data in this file.
If YES, reduce any stereo data to mono (stereo samples don't support panning or positional audio).
- (AudioStreamBasicDescription *) streamDescription |
|
readnonatomicassign |
A description of the audio data in this file.
The total number of audio frames in this file.
The URL of the audio file.
The documentation for this class was generated from the following files: