以下程式碼是原本wav預設的格式
//通道數:“1”代表單聲道;“2”代表雙聲道--->使用mono單通道
stream.Write(BitConverter.GetBytes((UInt16)audioFormat.Channels), 0, 2);
// 取樣頻率,即每秒取樣數
stream.Write(BitConverter.GetBytes((UInt32)audioFormat.SamplesPerSecond), 0,4);
==============================================================================
預設:
最後輸出:雙聲道
取樣頻率:44100 Hz
我要如何改成我想要的格式呢?
最後輸出:單聲道
取樣頻率:8000 Hz
我有嘗試過將(audioFormat.Channels-1),(audioFormat.SamplesPerSecond-36100)
雖然結果是我要的格式,但是音檔內容聲音卻變得很扁很低沉?
我應該如何做設計才可以像轉檔程式一樣聲音不會差異太大
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.169.216
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:18)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:19)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:20)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:22)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:24)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:26)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:27)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:28)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:31)
※ 編輯: spider1216 來自: 140.117.169.216 (01/22 16:31)