-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathUKAudioBufferList.h
32 lines (23 loc) · 1007 Bytes
/
UKAudioBufferList.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
//
// UKAudioBufferList.h
// UKSoundWaveformView
//
// Created by Uli Kusterer on 07.10.09.
// Copyright 2009 The Void Software. All rights reserved.
//
/*
Object to hold and read a bunch of audio samples read from a UKExtAudioFile.
This is a thin wrapper around an AudioBufferList.
*/
#import <Cocoa/Cocoa.h>
@interface UKAudioBufferList : NSObject
{
struct UKAudioBufferListIVars* ivars;
}
-(id) initWithCapacity: (NSUInteger)numFrames audioFormat: (void*)streamDesc; // streamDesc is an AudioStreamBasicDescription*
-(void*) bufferList; // AudioBufferList* containing one buffer for initial filling. After that, this object is immutable!
// If you change this, be sure to call setFrameCount: to make it match.
-(void) setFrameCount: (NSInteger)fc; // MUST BE <= capacity! Only for initial filling. After that, this object is immutable!
-(NSInteger) frameCount; // # of frames in this buffer list instance.
-(float) frameAtIndex: (NSInteger)idx; // Read one frame's level.
@end