forked from Epskampie/ios-coreaudio-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIosAudioController.h
More file actions
39 lines (31 loc) · 905 Bytes
/
IosAudioController.h
File metadata and controls
39 lines (31 loc) · 905 Bytes
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
37
38
39
//
// IosAudioController.h
// Aruts
//
// Created by Simon Epskamp on 10/11/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#include "TPCircularBuffer.h"
#ifndef max
#define max( a, b ) ( ((a) > (b)) ? (a) : (b) )
#endif
#ifndef min
#define min( a, b ) ( ((a) < (b)) ? (a) : (b) )
#endif
@interface IosAudioController : NSObject {
AudioComponentInstance audioUnit;
//AudioBuffer tempBuffer; // this will hold the latest data from the microphone
@public
TPCircularBuffer buffer;
}
@property (readonly) AudioComponentInstance audioUnit;
//@property (readonly) AudioBuffer tempBuffer;
- (void) start;
- (void) stop;
- (void) processAudio: (AudioBufferList*) bufferList;
@end
// setup a global iosAudio variable, accessible everywhere
extern IosAudioController* iosAudio;
IosAudioController* iosAudio;