-
Notifications
You must be signed in to change notification settings - Fork 5
/
BufferedAudioUnit.h
36 lines (26 loc) · 1.27 KB
/
BufferedAudioUnit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// BufferedAudioUnit.h
// AppleAudioUnit
//
// Created by David O'Neill on 12/15/18.
// Copyright © 2018 David O'Neill. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <AudioToolbox/AudioToolbox.h>
NS_ASSUME_NONNULL_BEGIN
/** No Swift or ObjC functions and property access. No ARC managed references/assignments. */
typedef void(^ProcessEventsBlock)(AudioBufferList * _Nullable inBuffer,
AudioBufferList * _Nonnull outBuffer,
const AudioTimeStamp * _Nonnull timestamp,
AVAudioFrameCount frameCount,
const AURenderEvent * _Nullable eventsListHead);
@interface BufferedAudioUnit : AUAudioUnit
/** Subclasses should overide this to return a block to do processing in. */
-(ProcessEventsBlock)processEventsBlock:(AVAudioFormat *)format;
/** If true, an input bus will be allocated, intended for sunclasses to override, defaults to true. */
-(BOOL)shouldAllocateInputBus;
/** If true, the output buffer samples will be set to zero pre-render, Intended for subclasses to override, defaults to false. */
-(BOOL)shouldClearOutputBuffer;
@end
NS_ASSUME_NONNULL_END