summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLPCMAudioConverter.h
blob: abd1a880a310acd32b291eea794f2d86a11566b0 (plain)
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
//
//  SDLPCMAudioConverter.h
//  SmartDeviceLink-Example
//
//  Created by Joel Fischer on 10/24/17.
//  Copyright © 2017 smartdevicelink. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

extern NSString *const SDLErrorDomainPCMAudioStreamConverter;

@interface SDLPCMAudioConverter : NSObject

@property (assign, nonatomic, readonly) UInt32 estimatedDuration;

- (nullable instancetype)initWithFileURL:(NSURL *)fileURL;

/**
 Synchronously convert the file that it was init'd with, returning an error if it fails and the NSURL of the new file if it succeeds

 @param error An error object containing the OSStatus if it failed to convert
 @return The NSURL of the newly converted file
 */
- (nullable NSURL *)convertFileWithError:(NSError *__autoreleasing *)error;

@end

NS_ASSUME_NONNULL_END