Skip to content

Commit

Permalink
PCM工具增加支持24位源文件
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyuecn committed Jan 3, 2021
1 parent 2e261f3 commit 888f115
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/工具-裸PCM转WAV播放测试.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
var res=new Int16Array(arr.length/3);
for(var i=0,j=0;j<arr.length;){
//24bit pcm转成浮点数
//https://www.codeproject.com/articles/501521/how-to-convert-between-most-audio-formats-in-net
var n=((arr[j++] | (arr[j++]<<8) | (arr[j++]<<16))<<8)>>8;
n=n/16777216;
//浮点数转成16位
Expand Down

0 comments on commit 888f115

Please sign in to comment.