Szerkesztés

Megosztás a következőn keresztül:


AudioFile.OpenRead Method

Definition

Overloads

OpenRead(CFUrl, AudioFileType)

Opens the specified audio file for reading, frames will be decoded from the native format to raw audio data.

OpenRead(NSUrl, AudioFileType)

Opens the specified audio file for reading, frames will be decoded from the native format to raw audio data.

OpenRead(String, AudioFileType)

Opens an audio file for reading.

OpenRead(CFUrl, AudioFileError, AudioFileType)

Opens an audio file for reading.

OpenRead(NSUrl, AudioFileError, AudioFileType)

Opens an audio file for reading.

OpenRead(String, AudioFileError, AudioFileType)

Opens an audio file for reading.

OpenRead(CFUrl, AudioFileType)

Opens the specified audio file for reading, frames will be decoded from the native format to raw audio data.

public static AudioToolbox.AudioFile OpenRead (CoreFoundation.CFUrl url, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : CoreFoundation.CFUrl * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
CFUrl

Url pointing to the file to read.

fileTypeHint
AudioFileType

A hint indicating the file format expected, this is necessary for audio files where the operating system can not probe the type by looking at the file signature or file extension (for example AC3. Pass zero to auto detect the format.

Returns

An instance of AudioFile on success, or null on error.

Remarks

Once you have opened the file for reading, you can use the various Read methods to decode the audio packets contained in the file.

Applies to

OpenRead(NSUrl, AudioFileType)

Opens the specified audio file for reading, frames will be decoded from the native format to raw audio data.

public static AudioToolbox.AudioFile OpenRead (Foundation.NSUrl url, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : Foundation.NSUrl * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
NSUrl

Url pointing to the file to read.

fileTypeHint
AudioFileType

A hint indicating the file format expected, this is necessary for audio files where the operating system can not probe the type by looking at the file signature or file extension (for example AC3. Pass zero to auto detect the format.

Returns

An instance of AudioFile on success, or null on error.

Remarks

Once you have opened the file for reading, you can use the various Read methods to decode the audio packets contained in the file.

Applies to

OpenRead(String, AudioFileType)

Opens an audio file for reading.

public static AudioToolbox.AudioFile OpenRead (string url, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : string * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
String

An url to a local file name.

fileTypeHint
AudioFileType

A hint indicating the file format expected, this is necessary for audio files where the operating system can not probe the type by looking at the file signature or file extension (for example AC3. Pass zero to auto detect the format.

Returns

An instance of AudioFile on success, or null on error.

Remarks

The hint is necessary as sometimes it is not possible to determine the file type merely based on the contents of the file.

Applies to

OpenRead(CFUrl, AudioFileError, AudioFileType)

Opens an audio file for reading.

public static AudioToolbox.AudioFile OpenRead (CoreFoundation.CFUrl url, out AudioToolbox.AudioFileError error, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : CoreFoundation.CFUrl *  * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
CFUrl
fileTypeHint
AudioFileType

Returns

An instance of AudioFile on success, or null on error.

Remarks

The hint is necessary as sometimes it is not possible to determine the file type merely based on the contents of the file.

Applies to

OpenRead(NSUrl, AudioFileError, AudioFileType)

Opens an audio file for reading.

public static AudioToolbox.AudioFile OpenRead (Foundation.NSUrl url, out AudioToolbox.AudioFileError error, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : Foundation.NSUrl *  * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
NSUrl
fileTypeHint
AudioFileType

Returns

An instance of AudioFile on success, or null on error.

Remarks

The hint is necessary as sometimes it is not possible to determine the file type merely based on the contents of the file.

Applies to

OpenRead(String, AudioFileError, AudioFileType)

Opens an audio file for reading.

public static AudioToolbox.AudioFile OpenRead (string url, out AudioToolbox.AudioFileError error, AudioToolbox.AudioFileType fileTypeHint = (AudioToolbox.AudioFileType) 0);
static member OpenRead : string *  * AudioToolbox.AudioFileType -> AudioToolbox.AudioFile

Parameters

url
String
fileTypeHint
AudioFileType

Returns

An instance of AudioFile on success, or null on error.

Remarks

The hint is necessary as sometimes it is not possible to determine the file type merely based on the contents of the file.

Applies to