mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-08 18:55:14 +00:00
29 lines
699 B
Objective-C
29 lines
699 B
Objective-C
//
|
|
// AudioQueue.h
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 14/01/2016.
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@class CSAudioQueue;
|
|
|
|
@protocol CSAudioQueueDelegate
|
|
- (void)audioQueueDidCompleteBuffer:(nonnull CSAudioQueue *)audioQueue;
|
|
@end
|
|
|
|
@interface CSAudioQueue : NSObject
|
|
|
|
- (nonnull instancetype)initWithSamplingRate:(Float64)samplingRate;
|
|
- (void)enqueueAudioBuffer:(nonnull const int16_t *)buffer numberOfSamples:(size_t)lengthInSamples;
|
|
|
|
@property (nonatomic, readonly) Float64 samplingRate;
|
|
@property (nonatomic, weak) id<CSAudioQueueDelegate> delegate;
|
|
|
|
+ (Float64)preferredSamplingRate;
|
|
+ (NSUInteger)bufferSize;
|
|
|
|
@end
|