Audio buffer manager class. More...
#import <AEAudioBufferManager.h>
Inherits <NSObject>.
Instance Methods | |
(instancetype) | - initWithBufferList: |
Create an instance. | |
(AudioBufferList *) | - AEAudioBufferManagerGetBuffer |
Get the audio buffer list. | |
(pthread_rwlock_t *) | - AEAudioBufferManagerGetLock |
Access the read/write lock. | |
Audio buffer manager class.
This class allows you to apply normal Objective-C memory management techniques to an AudioBufferList structure, which can simply buffer management tasks.
Create an instance of this class, passing in an already-initialized AudioBufferList, and the class will manage the remaining life-cycle of the buffer list.
- (instancetype) initWithBufferList: | (AudioBufferList *) | bufferList |
Create an instance.
bufferList | An initialized AudioBufferList structure (see AEAudioBufferListCreate) |
- (AudioBufferList*) AEAudioBufferManagerGetBuffer | (__unsafe_unretained AEAudioBufferManager *) | buffer |
Get the audio buffer list.
This method is safe for use on the realtime audio thread.
- (pthread_rwlock_t*) AEAudioBufferManagerGetLock | (__unsafe_unretained AEAudioBufferManager *) | buffer |
Access the read/write lock.
Use this when you need to manage multiple threads with access to the buffer list.
Important: Never hold locks on the audio thread. If mutual exclusion is necessary, use a try lock, which is non-blocking.