Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLAudioFile

SDLAudioFile Class Reference

Section Contents

Overview

Includes information about a given audio file

inputFileURL

If initialized with a file URL, the file URL it came from

Objective-C

@property (nonatomic, copy, readonly, nullable) NSURL *inputFileURL;

Swift

var inputFileURL: URL? { get }

outputFileURL

If initialized with a file URL, where the transcoder should produce the transcoded PCM audio file

Objective-C

@property (nonatomic, copy, readonly, nullable) NSURL *outputFileURL;

Swift

var outputFileURL: URL? { get }

estimatedDuration

In seconds. UINT32_MAX if unknown.

Objective-C

@property (nonatomic) UInt32 estimatedDuration;

Swift

var estimatedDuration: UInt32 { get set }

data

The PCM audio data to be transferred and played

Objective-C

@property (nonatomic, copy, readonly) NSData *_Nonnull data;

Swift

var data: Data { get }

fileSize

The size of the PCM audio data in bytes

Objective-C

@property (nonatomic, readonly) unsigned long long fileSize;

Swift

var fileSize: UInt64 { get }

-initWithInputFileURL:outputFileURL:estimatedDuration:

Initialize an audio file to be queued and played

Objective-C

- (nonnull instancetype)initWithInputFileURL:(nonnull NSURL *)inputURL
                               outputFileURL:(nonnull NSURL *)outputURL
                           estimatedDuration:(UInt32)duration;

Swift

init(inputFileURL inputURL: URL, outputFileURL outputURL: URL, estimatedDuration duration: UInt32)

Parameters

inputURL

The file that exists on the device to be transcoded and queued

outputURL

The target URL that the transcoded file will be output to

duration

The duration of the file

Return Value

The audio file object

-initWithData:

Initialize a buffer of PCM audio data to be queued and played

Objective-C

- (nonnull instancetype)initWithData:(nonnull NSData *)data;

Swift

init(data: Data)

Parameters

data

The PCM audio data buffer

Return Value

The audio file object

View on GitHub.com
Previous Section Next Section