Bewerken

Delen via


AudioSource Class

Definition

A derived class from AudioFile that exposes virtual methods that can be hooked into (for reading and writing)

public abstract class AudioSource : AudioToolbox.AudioFile
type AudioSource = class
    inherit AudioFile
Inheritance
AudioSource

Remarks

AudioSource is an abstract class that derives from AudioFile that allows developers to hook up into the reading and writing stages of the AudioFile. This can be used for example to read from an in-memory audio file, or to write to an in-memory buffer.

When you write data into the AudioSource using any of the methods from AudioFile, instead of writing the encoded data into a file, the data is sent to the Read abstract method.

To use this class, you must create a class that derives from AudioSource and override the Read, Write methods and the Size property.

Constructors

AudioSource()

Constructor used when creating subclasses

AudioSource(AudioFileType, AudioStreamBasicDescription)
AudioSource(AudioFileType)

Properties

AlbumArtwork

Gets the album artwork for the audio file.

(Inherited from AudioFile)
AudioFormats

Returns a list of the supported audio formats.

(Inherited from AudioFile)
BitRate

Audio file bit rate.

(Inherited from AudioFile)
ChannelLayout

Gets the channel layout of the audio file.

(Inherited from AudioFile)
ChunkIDs

Gets an array of four-character codes that describe the kind of each chunk in the audio file.

(Inherited from AudioFile)
DataFormat

Gets the AudioStreamBasicDescription, if present, that describes the format of the audio data.

(Inherited from AudioFile)
DataOffset

Gets the offset, in bytes, to the beginning of the audio data in the audio file.

(Inherited from AudioFile)
DataPacketCount

Gets the number of audio data packets in the audio file.

(Inherited from AudioFile)
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 false

(Inherited from AudioFile)
EstimatedDuration

Gets the estimated duration, in seconds, of the audio data in the file.

(Inherited from AudioFile)
FileType

Audio file type.

(Inherited from AudioFile)
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from AudioFile)
ID3Tag

Gets a byte array that contains the ID3Tag for the audio data.

(Inherited from AudioFile)
InfoDictionary

Gets the CF dictionary that contains audio file metadata.

(Inherited from AudioFile)
IsOptimized

Gets a Boolean value that tells whether the audio file has been optimized and is ready to receive sound data.

(Inherited from AudioFile)
Length

Audio file size, in bytes.

(Inherited from AudioFile)
MagicCookie

The magic cookie for this file.

(Inherited from AudioFile)
MarkerList

Gets the AudioFileMarkerList that contains the markers for the audio file.

(Inherited from AudioFile)
MaximumPacketSize

Gets the maximum audio packet size.

(Inherited from AudioFile)
PacketSizeUpperBound

Gets the theoretical upper bound for the audio packet size for audio data in the file.

(Inherited from AudioFile)
PacketTableInfo

Gets or sets the AudioFilePacketTableInfo structure that describes the audio file packet table.

(Inherited from AudioFile)
PacketTableInfoStatus

Gets the status of the audio packet table..

(Inherited from AudioFile)
RegionList

Gets a list of all the audio regions in the audio file.

(Inherited from AudioFile)
ReserveDuration

Gets the amount of recording time to reserve in the audio file.

(Inherited from AudioFile)
Size

Used to set or get the size of the audio stream.

StreamBasicDescription

The audio basic description, as determined by decoding the file.

(Inherited from AudioFile)
StreamBasicDescriptionStatus

Gets the status of the stream's basic description.

(Inherited from AudioFile)

Methods

ByteToPacket(Int64, Int32, Boolean)

Converts a position on a stream to its packet location.

(Inherited from AudioFile)
CountUserData(UInt32)

Returns the number of user data items that have the specified userData.

(Inherited from AudioFile)
Dispose()

Releases the resources used by the AudioFile object.

(Inherited from AudioFile)
Dispose(Boolean)

Releases the resources used by the AudioSource object.

FrameToPacket(Int64, Int32)

Converts an audio frame into a packet offset.

(Inherited from AudioFile)
GetProperty(AudioFileProperty, Int32, IntPtr)

Returns the value of the specified audio property, stores it in outData, and stores the number of bytes allocated to store it in dataSize.

(Inherited from AudioFile)
GetProperty(AudioFileProperty, Int32)

Returns the value of the specified audio property, and stores the number of bytes allocated to store it in size.

(Inherited from AudioFile)
GetPropertyInfo(AudioFileProperty, Int32, Int32)

Returns the value of the specified audio property, and stores the number of bytes allocated to store it in size, and indicates whether the value is writeable.

(Inherited from AudioFile)
GetUserData(Int32, Int32, Int32, IntPtr)

Gets the indexth chunk of user data that has the specified userDataID.

(Inherited from AudioFile)
GetUserDataSize(UInt32, Int32)

Gets the size of the indexth chunk of user data that has the specified userDataID.

(Inherited from AudioFile)
Initialize(AudioFileType, AudioStreamBasicDescription)
IsPropertyWritable(AudioFileProperty)

Checks whether the property value is settable.

(Inherited from AudioFile)
Open(AudioFileType)
Optimize()

Optimizes the audio file, thus preparing it to receive audio data.

(Inherited from AudioFile)
PacketToByte(Int64, Boolean)

Returns the byte offset for the packet and indicates whether this is an estimated value in isEstimate.

(Inherited from AudioFile)
PacketToFrame(Int64)

Returns the frame number for the specified packet.

(Inherited from AudioFile)
Read(Int64, Byte[], Int32, Int32, Boolean)

Reads count bytes from buffer, starting at startingByte.

(Inherited from AudioFile)
Read(Int64, Int32, IntPtr, Int32)

Callback invoked to read encoded audio data.

ReadFixedPackets(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError)

Reads a fixed amount of audio data.

(Inherited from AudioFile)
ReadFixedPackets(Boolean, Int64, Int32, Byte[], Int32, Int32)

Reads a fixed amount of audio data.

(Inherited from AudioFile)
ReadFixedPackets(Int64, Int32, Byte[], AudioFileError)

Reads a fixed amount of audio data.

(Inherited from AudioFile)
ReadFixedPackets(Int64, Int32, Byte[])

Reads nPackets bytes into buffer, starting at inStartingPacket.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError)

Reads packets of audio data.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32, AudioFileError)

Reads packets of audio data.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32)

Reads packets of audio data from an audio file.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, Byte[], Int32, Int32)

Reads packets of audio data from an audio file.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError, AudioStreamPacketDescription[])

Reads packets of audio data.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32, AudioFileError)

Reads packets of audio data.

(Inherited from AudioFile)
ReadPacketData(Boolean, Int64, Int32, IntPtr, Int32)

Reads packets of audio data from an audio file.

(Inherited from AudioFile)
ReadPacketData(Int64, Int32, Byte[], AudioFileError)

Reads packets of audio data.

(Inherited from AudioFile)
ReadPacketData(Int64, Int32, Byte[])

Reads packets of audio data from an audio file.

(Inherited from AudioFile)
RemoveUserData(Int32, Int32)

Removes the chunk of user data at the specified index in the user data that is identified by userDataID.

(Inherited from AudioFile)
SetProperty(AudioFileProperty, Int32, IntPtr)

Sets the value of the specified property to propertyData, which must have the size that is specified in dataSize.

(Inherited from AudioFile)
SetUserData(Int32, Int32, Int32, IntPtr)

Sets the value at the specified index into the specified property to propertyData, which must have the size that is specified in dataSize.

(Inherited from AudioFile)
Write(Int64, Byte[], Int32, Int32, Boolean, Int32)

Writes data to an audo file.

(Inherited from AudioFile)
Write(Int64, Byte[], Int32, Int32, Boolean)

Writes a block of data to the audio file.

(Inherited from AudioFile)
Write(Int64, Int32, IntPtr, Int32)

Callback used to write audio data into the audio stream.

WritePackets(Boolean, Int32, AudioStreamPacketDescription[], Int64, Int32, IntPtr)

Writes audio packets to the file.

(Inherited from AudioFile)
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32, Int32)

Writes packets to an audo file.

(Inherited from AudioFile)
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], Byte[], Int32, Int32)

Writes audio packets to the file.

(Inherited from AudioFile)
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32, Int32)

Writes packets to an audo file.

(Inherited from AudioFile)
WritePackets(Boolean, Int64, AudioStreamPacketDescription[], IntPtr, Int32)

Write audio packets to the audio file.

(Inherited from AudioFile)
WritePackets(Boolean, Int64, Int32, IntPtr, Int32)

Writes packets to an audo file.

(Inherited from AudioFile)

Applies to