AudioFile.Write 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Write(Int64, Byte[], Int32, Int32, Boolean) |
將資料區塊寫入音訊檔案。 |
Write(Int64, Byte[], Int32, Int32, Boolean, Int32) |
將資料寫入 audo 檔案。 |
Write(Int64, Byte[], Int32, Int32, Boolean)
將資料區塊寫入音訊檔案。
public int Write (long startingByte, byte[] buffer, int offset, int count, bool useCache);
member this.Write : int64 * byte[] * int * int * bool -> int
參數
- startingByte
- Int64
檔案中即將寫入資料的起始位元組。
- buffer
- Byte[]
保存資料的緩衝區。
- offset
- Int32
緩衝區內要儲存之資料的位移開始。
- count
- Int32
要寫入檔案的位元組數目。
- useCache
- Boolean
是否應該快取資料。
傳回
寫入資料流程的位元組數目,或發生錯誤時為 -1。
備註
此 API 只會將位元組寫入檔案,而不需要任何編碼。 使用 WritePackets 以編碼方式寫入。