AudioFile.WritePackets 方法

定义

重载

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

将音频数据包写入音频文件。

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

将数据包写入 audo 文件。

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

将音频数据包写入文件。

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

将音频数据包写入文件。

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

将数据包写入 audo 文件。

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

将数据包写入 audo 文件。

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

将音频数据包写入音频文件。

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

参数

useCache
Boolean

是否应将数据保留在缓存中。

startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

packetDescriptions
AudioStreamPacketDescription[]

描述缓冲区内容的数据包说明数组。

buffer
IntPtr

nativeint

包含音频数据的缓冲区。

byteCount
Int32

返回

写入或出错时为 -1 的数据包数。

适用于

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

将数据包写入 audo 文件。

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

参数

useCache
Boolean
startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

numPackets
Int32
buffer
IntPtr

nativeint

byteCount
Int32

返回

适用于

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

将音频数据包写入文件。

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

参数

useCache
Boolean

是否应将数据保留在缓存中。

numBytes
Int32

要写入的字节数。

packetDescriptions
AudioStreamPacketDescription[]

描述缓冲区内容的数据包说明数组。

startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

numPackets
Int32

要写入的数据包数替换为实际写入的数据包数。

buffer
IntPtr

nativeint

包含音频数据的缓冲区。

返回

状态错误代码。

适用于

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

将音频数据包写入文件。

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

参数

useCache
Boolean

是否应将数据保留在缓存中。

startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

packetDescriptions
AudioStreamPacketDescription[]

描述缓冲区内容的数据包说明数组。

buffer
Byte[]

包含音频数据的缓冲区。

offset
Int32

要从 packetDescriptions 写入的第一个数据包。

byteCount
Int32

返回

写入或出错时为 -1 的数据包数。

适用于

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

将数据包写入 audo 文件。

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

参数

useCache
Boolean

是否应将数据保留在缓存中。

startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

packetDescriptions
AudioStreamPacketDescription[]

描述缓冲区内容的数据包说明数组。

buffer
IntPtr

nativeint

byteCount
Int32
errorCode
Int32

返回

适用于

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

将数据包写入 audo 文件。

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

参数

useCache
Boolean

是否应将数据保留在缓存中。

startingPacket
Int64

应写入的 packetDescriptions 中的起始数据包。

packetDescriptions
AudioStreamPacketDescription[]

描述缓冲区内容的数据包说明数组。

buffer
Byte[]
offset
Int32
byteCount
Int32
errorCode
Int32

返回

适用于