AudioFile Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Class used to create or read audio files.
public class AudioFile : ObjCRuntime.DisposableObject
type AudioFile = class
inherit DisposableObject
- Inheritance
- Derived
Remarks
Use the Create, Open and OpenRead factory methods to create instances of this class.
This class provides access to the encoder and decoder for compressed audio files.
Properties
| Name | Description |
|---|---|
| AlbumArtwork |
Gets the album artwork for the audio file. |
| AudioFormats |
Returns a list of the supported audio formats. |
| BitRate |
Audio file bit rate. |
| ChannelLayout |
Gets the channel layout of the audio file. |
| ChunkIDs |
Gets an array of four-character codes that describe the kind of each chunk in the audio file. |
| DataFormat |
Gets the AudioStreamBasicDescription, if present, that describes the format of the audio data. |
| DataOffset |
Gets the offset, in bytes, to the beginning of the audio data in the audio file. |
| DataPacketCount |
Gets the number of audio data packets in the audio file. |
| DeferSizeUpdates |
Gets or sets a boolean value that controls whether the updating of file size information in the header will be deferred until the file is read, optimized, or closed. The default, which is safer, is |
| EstimatedDuration |
Gets the estimated duration, in seconds, of the audio data in the file. |
| FileType |
Audio file type. |
| Handle | (Inherited from DisposableObject) |
| ID3Tag |
Gets a byte array that contains the ID3Tag for the audio data. |
| InfoDictionary |
Gets the dictionary that contains audio file metadata. |
| IsOptimized |
Gets a Boolean value that tells whether the audio file has been optimized and is ready to receive sound data. |
| Length |
Audio file size, in bytes. |
| MagicCookie |
The magic cookie for this file. |
| MarkerList |
Gets the AudioFileMarkerList that contains the markers for the audio file. |
| MaximumPacketSize |
Gets the maximum audio packet size. |
| Owns | (Inherited from DisposableObject) |
| PacketSizeUpperBound |
Gets the theoretical upper bound for the audio packet size for audio data in the file. |
| PacketTableInfo |
Gets or sets the AudioFilePacketTableInfo structure that describes the audio file packet table. |
| PacketTableInfoStatus |
Gets the status of the audio packet table.. |
| RegionList |
Gets a list of all the audio regions in the audio file. |
| ReserveDuration |
Gets the amount of recording time to reserve in the audio file. |
| StreamBasicDescription |
The audio basic description, as determined by decoding the file. |
| StreamBasicDescriptionStatus |
Gets the status of the stream's basic description. |
Methods
| Name | Description |
|---|---|
| ByteToPacket(Int64, Int32, Boolean) |
Converts a position on a stream to its packet location. |
| ClearHandle() | (Inherited from DisposableObject) |
| CountUserData(AudioFileChunkType) |
Get the number of user data for the specified chunk type. |
| CountUserData(UInt32) |
Get the number of user data for the specified chunk type. |
| Create(CFUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags, AudioFileError) |
Create a new audio file. |
| Create(CFUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Create a new audio file. |
| Create(NSUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags, AudioFileError) |
Create a new audio file. |
| Create(NSUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Create a new audio file. |
| Create(String, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Create a new audio file. |
| Dispose() | (Inherited from DisposableObject) |
| Dispose(Boolean) | |
| Equals(Object) | (Inherited from DisposableObject) |
| FrameToPacket(Int64, Int32) |
Converts an audio frame into a packet offset. |
| GetCheckedHandle() | (Inherited from DisposableObject) |
| GetHashCode() | (Inherited from DisposableObject) |
| GetProperty(AudioFileProperty, Int32, IntPtr) |
Returns the value of the specified audio property, stores it in |
| GetProperty(AudioFileProperty, Int32) |
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
| GetPropertyInfo(AudioFileProperty, Int32, Boolean, AudioFileError) |
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
| GetPropertyInfo(AudioFileProperty, Int32, Boolean) |
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
| GetPropertyInfo(AudioFileProperty, Int32, Int32, AudioFileError) |
Obsolete.
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
| GetPropertyInfo(AudioFileProperty, Int32, Int32) |
Obsolete.
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
| GetUserData(AudioFileChunkType, Int32, Int32, IntPtr) |
Get part of the data of a chunk in a file. |
| GetUserData(AudioFileChunkType, Int32, Int64, Byte[], Int32) |
Get part of the data of a chunk in a file. |
| GetUserData(AudioFileChunkType, Int32, Int64, Int32, IntPtr) |
Get part of the data of a chunk in a file. |
| GetUserData(Int32, Int32, Int32, IntPtr) |
Get part of the data of a chunk in a file. |
| GetUserData(UInt32, Int32, Int64, Byte[], Int32) |
Get part of the data of a chunk in a file. |
| GetUserData(UInt32, Int32, Int64, Int32, IntPtr) |
Get part of the data of a chunk in a file. |
| GetUserDataSize(AudioFileChunkType, Int32, UInt64) |
Get the 64-bit size of the specified user data. |
| GetUserDataSize(AudioFileChunkType, Int32) |
Get the size of the specified user data. |
| GetUserDataSize(UInt32, Int32, UInt64) |
Get the 64-bit size of the specified user data. |
| GetUserDataSize(UInt32, Int32) |
Get the size of the specified user data. |
| InitializeHandle(NativeHandle) | (Inherited from DisposableObject) |
| IsPropertyWritable(AudioFileProperty) |
Checks whether the property value is settable. |
| Open(CFUrl, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| Open(CFUrl, AudioFilePermission, AudioFileType) |
Opens an audio file for reading. |
| Open(NSUrl, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| Open(NSUrl, AudioFilePermission, AudioFileType) |
Opens an audio file for reading. |
| Open(String, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| Open(String, AudioFilePermission, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(CFUrl, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(CFUrl, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(NSUrl, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(NSUrl, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(String, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
| OpenRead(String, AudioFileType) |
Opens an audio file for reading. |
| Optimize() |
Optimizes the audio file, thus preparing it to receive audio data. |
| PacketToByte(Int64, Boolean) |
Returns the byte offset for the |
| PacketToFrame(Int64) |
Returns the frame number for the specified |
| Read(Int64, Byte[], Int32, Int32, Boolean) |
Reads |
| ReadFixedPackets(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError) |
Reads |
| ReadFixedPackets(Boolean, Int64, Int32, Byte[], Int32, Int32) |
Reads |
| ReadFixedPackets(Int64, Int32, Byte[], AudioFileError) |
Reads |
| ReadFixedPackets(Int64, Int32, Byte[]) |
Reads |
| ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError, AudioStreamPacketDescription[]) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Int64, Int32, Byte[], AudioFileError) |
Reads packets of audio data from an audio file. |
| ReadPacketData(Int64, Int32, Byte[]) |
Reads packets of audio data from an audio file. |
| RemoveUserData(AudioFileChunkType, Int32) |
Removes the specified chunk of user data. |
| RemoveUserData(Int32, Int32) |
Obsolete.
Removes the chunk of user data at the specified |
| SetProperty(AudioFileProperty, Int32, IntPtr) |
Sets the value of the specified |
| SetUserData(AudioFileChunkType, Int32, Byte[]) |
Set the data of a chunk in a file. |
| SetUserData(Int32, Int32, Int32, IntPtr) |
Obsolete.
Sets the value at the specified |
| Write(Int64, Byte[], Int32, Int32, Boolean, AudioFileError) |
Writes a block of data to the audio file. |
| Write(Int64, Byte[], Int32, Int32, Boolean, Int32) |
Obsolete.
Writes a block of data to the audio file. |
| Write(Int64, Byte[], Int32, Int32, Boolean) |
Writes a block of data to the audio file. |
| WritePackets(Boolean, AudioStreamPacketDescription[], AudioStreamPacketDependencyDescription[], Int64, Int32, Byte[], Int32, Int32) |
Writes audio packets to the file. |
| WritePackets(Boolean, AudioStreamPacketDescription[], AudioStreamPacketDependencyDescription[], Int64, Int32, IntPtr, Int32) |
Writes audio packets to the file. |
| WritePackets(Boolean, Int32, AudioStreamPacketDescription[], Int64, Int32, IntPtr) |
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32, AudioFileError) |
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32, Int32) |
Obsolete.
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32) |
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32, AudioFileError) |
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32, Int32) |
Obsolete.
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32) |
Write audio packets to the audio file. |
| WritePackets(Boolean, Int64, Int32, IntPtr, Int32) |
Write audio packets to the audio file. |
Extension Methods
| Name | Description |
|---|---|
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |