-
Notifications
You must be signed in to change notification settings - Fork 5
/
AudioEmbeddedFileInputPatch.h
45 lines (32 loc) · 1.08 KB
/
AudioEmbeddedFileInputPatch.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
37
38
39
40
41
42
43
44
45
#import "AudioToolsFFT.h"
#import <AudioToolbox/AudioToolbox.h>
@interface AudioEmbeddedFileInputPatch : QCPatch
{
QCIndexPort *inputSampleBuffer;
QCIndexPort *inputFrequencyMode;
QCStructurePort *outputWaveform;
QCStructurePort *outputPeaks;
QCStructurePort *outputFrequency;
QCImagePort *outputWaveformImage;
QCNumberPort *outputDuration;
NSData *audioData;
AudioFileID audioDataFile;
ExtAudioFileRef audioFile;
AudioBufferList *mBufferList;
float sampleRate;
SInt64 headerFrames;
CGColorSpaceRef cs;
BOOL isMP3; // need to decode mp3s a bit differently to get meaningful datas...
AudioToolsFFT *_fft;
int _requestedFrames;
}
- (id)initWithIdentifier:(id)fp8;
- (BOOL)setup:(QCOpenGLContext *)context;
- (void)cleanup:(QCOpenGLContext *)context;
- (void)enable:(QCOpenGLContext *)context;
- (void)disable:(QCOpenGLContext *)context;
- (void)_openData;
- (BOOL)execute:(QCOpenGLContext *)context time:(double)time arguments:(NSDictionary *)arguments;
- (SInt64)dataSize;
- (UInt32)readToBuffer:(void*)buffer fromPosition:(SInt64)inPosition count:(UInt32)count;
@end