-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathTPAACAudioConverter.h
52 lines (40 loc) · 1.77 KB
/
TPAACAudioConverter.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
46
47
48
49
50
51
52
//
// TPAACAudioConverter.h
//
// Created by Michael Tyson on 02/04/2011.
// Copyright 2011 A Tasty Pixel. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
extern NSString * TPAACAudioConverterErrorDomain;
enum {
TPAACAudioConverterFileError,
TPAACAudioConverterFormatError,
TPAACAudioConverterUnrecoverableInterruptionError,
TPAACAudioConverterInitialisationError
};
@protocol TPAACAudioConverterDelegate;
@protocol TPAACAudioConverterDataSource;
@interface TPAACAudioConverter : NSObject
+ (BOOL)AACConverterAvailable;
- (id)initWithDelegate:(id<TPAACAudioConverterDelegate>)delegate source:(NSString*)sourcePath destination:(NSString*)destinationPath;
- (id)initWithDelegate:(id<TPAACAudioConverterDelegate>)delegate dataSource:(id<TPAACAudioConverterDataSource>)dataSource audioFormat:(AudioStreamBasicDescription)audioFormat destination:(NSString*)destinationPath;
- (void)start;
- (void)cancel;
- (void)interrupt;
- (void)resume;
@property (nonatomic, readonly, strong) NSString *source;
@property (nonatomic, readonly, strong) NSString *destination;
@property (nonatomic, readonly) AudioStreamBasicDescription audioFormat;
@end
@protocol TPAACAudioConverterDelegate <NSObject>
- (void)AACAudioConverterDidFinishConversion:(TPAACAudioConverter*)converter;
- (void)AACAudioConverter:(TPAACAudioConverter*)converter didFailWithError:(NSError*)error;
@optional
- (void)AACAudioConverter:(TPAACAudioConverter*)converter didMakeProgress:(CGFloat)progress;
@end
@protocol TPAACAudioConverterDataSource <NSObject>
- (void)AACAudioConverter:(TPAACAudioConverter*)converter nextBytes:(char*)bytes length:(NSUInteger*)length;
@optional
- (void)AACAudioConverter:(TPAACAudioConverter *)converter seekToPosition:(NSUInteger)position;
@end