Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLAudioFile Class Reference

Section Contents

Overview

Undocumented

inputFileURL

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

Objective-C

@property (readonly, copy, nonatomic, 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 (readonly, copy, nonatomic, nullable) NSURL *outputFileURL;

Swift

var outputFileURL: URL? { get }

estimatedDuration

In seconds. UINT32_MAX if unknown.

Objective-C

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

Swift

var estimatedDuration: UInt32 { get set }

data

The PCM audio data to be transferred and played

Objective-C

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

Swift

var data: Data { get }

fileSize

The size of the PCM audio data in bytes

Objective-C

@property (readonly, assign, nonatomic) 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