Bewerken

Delen via


AudioFile.WritePackets Method

Definition

Overloads

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

Write audio packets to the audio file.

WritePackets(Boolean, Int64, Int32, IntPtr, Int32)

Writes packets 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[], IntPtr, Int32, Int32)

Writes packets to an audo 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.

public int WritePackets (bool useCache, long startingPacket, AudioToolbox.AudioStreamPacketDescription[] packetDescriptions, IntPtr buffer, int byteCount);
member this.WritePackets : bool * int64 * AudioToolbox.AudioStreamPacketDescription[] * nativeint * int -> int

Parameters

useCache
Boolean

Whether the data should be kept in the cache.

startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

packetDescriptions
AudioStreamPacketDescription[]

An array of packet descriptions that describe the content of the buffer.

buffer
IntPtr

nativeint

The buffer containing the audio data.

byteCount
Int32

Returns

The number of packets written or -1 on error.

Applies to

WritePackets(Boolean, Int64, Int32, IntPtr, Int32)

Writes packets to an audo file.

public int WritePackets (bool useCache, long startingPacket, int numPackets, IntPtr buffer, int byteCount);
member this.WritePackets : bool * int64 * int * nativeint * int -> int

Parameters

useCache
Boolean
startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

numPackets
Int32
buffer
IntPtr

nativeint

byteCount
Int32

Returns

Applies to

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

Writes audio packets to the file.

public AudioToolbox.AudioFileError WritePackets (bool useCache, int numBytes, AudioToolbox.AudioStreamPacketDescription[] packetDescriptions, long startingPacket, ref int numPackets, IntPtr buffer);
member this.WritePackets : bool * int * AudioToolbox.AudioStreamPacketDescription[] * int64 *  * nativeint -> AudioToolbox.AudioFileError

Parameters

useCache
Boolean

Whether the data should be kept in the cache.

numBytes
Int32

The number of bytes to write.

packetDescriptions
AudioStreamPacketDescription[]

An array of packet descriptions that describe the content of the buffer.

startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

numPackets
Int32

The number of packets to write replaced with the number of packets actually written.

buffer
IntPtr

nativeint

The buffer containing the audio data.

Returns

A status error code.

Applies to

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

Writes audio packets to the file.

public int WritePackets (bool useCache, long startingPacket, AudioToolbox.AudioStreamPacketDescription[] packetDescriptions, byte[] buffer, int offset, int byteCount);
member this.WritePackets : bool * int64 * AudioToolbox.AudioStreamPacketDescription[] * byte[] * int * int -> int

Parameters

useCache
Boolean

Whether the data should be kept in the cache.

startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

packetDescriptions
AudioStreamPacketDescription[]

An array of packet descriptions that describe the contents of the buffer.

buffer
Byte[]

The buffer containing the audio data.

offset
Int32

The first packet to write from the packetDescriptions.

byteCount
Int32

Returns

The number of packets written or -1 on error.

Applies to

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

Writes packets to an audo file.

public int WritePackets (bool useCache, long startingPacket, AudioToolbox.AudioStreamPacketDescription[] packetDescriptions, IntPtr buffer, int byteCount, out int errorCode);
member this.WritePackets : bool * int64 * AudioToolbox.AudioStreamPacketDescription[] * nativeint * int *  -> int

Parameters

useCache
Boolean

Whether the data should be kept in the cache.

startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

packetDescriptions
AudioStreamPacketDescription[]

An array of packet descriptions that describe the content of the buffer.

buffer
IntPtr

nativeint

byteCount
Int32
errorCode
Int32

Returns

Applies to

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

Writes packets to an audo file.

public int WritePackets (bool useCache, long startingPacket, AudioToolbox.AudioStreamPacketDescription[] packetDescriptions, byte[] buffer, int offset, int byteCount, out int errorCode);
member this.WritePackets : bool * int64 * AudioToolbox.AudioStreamPacketDescription[] * byte[] * int * int *  -> int

Parameters

useCache
Boolean

Whether the data should be kept in the cache.

startingPacket
Int64

The starting packet in the packetDescriptions that should be written.

packetDescriptions
AudioStreamPacketDescription[]

An array of packet descriptions that describe the content of the buffer.

buffer
Byte[]
offset
Int32
byteCount
Int32
errorCode
Int32

Returns

Applies to