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 audio files or read audio files.
public class AudioFile : IDisposable, ObjCRuntime.INativeObject
type AudioFile = class
interface IDisposable
interface INativeObject
- Inheritance
-
AudioFile
- Derived
- Implements
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.
Constructors
AudioFile(Boolean) |
This is an internal constructor, do not use directly. |
Properties
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 |
Handle (pointer) to the unmanaged object representation. |
ID3Tag |
Gets a byte array that contains the ID3Tag for the audio data. |
InfoDictionary |
Gets the CF 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. |
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
ByteToPacket(Int64, Int32, Boolean) |
Converts a position on a stream to its packet location. |
CountUserData(UInt32) |
Returns the number of user data items that have the specified |
Create(CFUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Creates a new audio file. |
Create(NSUrl, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Creates a new audio file. |
Create(String, AudioFileType, AudioStreamBasicDescription, AudioFileFlags) |
Creates a new audio file. |
Dispose() |
Releases the resources used by the AudioFile object. |
Dispose(Boolean) |
Releases the resources used by the AudioFile object. |
Finalize() |
Finalizer for the AudioFile object |
FrameToPacket(Int64, Int32) |
Converts an audio frame into a packet offset. |
GetProperty(AudioFileProperty, Int32) |
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
GetProperty(AudioFileProperty, Int32, IntPtr) |
Returns the value of the specified audio property, stores it in |
GetPropertyInfo(AudioFileProperty, Int32, Int32) |
Returns the value of the specified audio property, and stores the number of bytes allocated to store it in |
GetUserData(Int32, Int32, Int32, IntPtr) |
Gets the |
GetUserDataSize(UInt32, Int32) |
Gets the size of the |
IsPropertyWritable(AudioFileProperty) |
Checks whether the property value is settable. |
Open(CFUrl, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file. |
Open(CFUrl, AudioFilePermission, AudioFileType) |
Opens an audio file. |
Open(NSUrl, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file. |
Open(NSUrl, AudioFilePermission, AudioFileType) |
Opens an audio file. |
Open(String, AudioFilePermission, AudioFileError, AudioFileType) |
Opens an audio file. |
Open(String, AudioFilePermission, AudioFileType) |
Opens an audio file. |
OpenRead(CFUrl, 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. |
OpenRead(NSUrl, AudioFileError, AudioFileType) |
Opens an audio file for reading. |
OpenRead(NSUrl, AudioFileType) |
Opens the specified audio file for reading, frames will be decoded from the native format to raw audio data. |
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) |
Reads a fixed amount of audio data. |
ReadFixedPackets(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError) |
Reads a fixed amount of audio data. |
ReadFixedPackets(Int64, Int32, Byte[]) |
Reads |
ReadFixedPackets(Int64, Int32, Byte[], AudioFileError) |
Reads a fixed amount of audio data. |
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, Byte[], Int32, Int32, AudioFileError) |
Reads packets of audio data. |
ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError) |
Reads packets of audio data. |
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32) |
Reads packets of audio data from an audio file. |
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError) |
Reads packets of audio data. |
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError, AudioStreamPacketDescription[]) |
Reads packets of audio data. |
ReadPacketData(Int64, Int32, Byte[]) |
Reads packets of audio data from an audio file. |
ReadPacketData(Int64, Int32, Byte[], AudioFileError) |
Reads packets of audio data. |
RemoveUserData(Int32, Int32) |
Removes the chunk of user data at the specified |
SetProperty(AudioFileProperty, Int32, IntPtr) |
Sets the value of the specified |
SetUserData(Int32, Int32, Int32, IntPtr) |
Sets the value at the specified |
Write(Int64, Byte[], Int32, Int32, Boolean) |
Writes a block of data to the audio file. |
Write(Int64, Byte[], Int32, Int32, Boolean, Int32) |
Writes data to an audo file. |
WritePackets(Boolean, Int32, AudioStreamPacketDescription[], Int64, Int32, IntPtr) |
Writes audio packets to the file. |
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32) |
Writes audio packets to the file. |
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32, Int32) |
Writes packets to an audo file. |
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32) |
Write audio packets to the audio file. |
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32, Int32) |
Writes packets to an audo file. |
WritePackets(Boolean, Int64, Int32, IntPtr, Int32) |
Writes packets to an audo file. |