How can i convert 32 bit PCM wave into 16 bit PCM??
I was making software to record system volume using LoopBackCapture. Its capturing data of 32 bit PCM ( 32 bit PCM: 48kHz 2 channels wBitsPerSample:32 dwChannelMask:3 subFormat:00000003-0000-0010-8000-00aa00389b71 extraSize:22 )
I want to convert it into a 16 bit stereo data....I am not able to get it...
Its my code to convert the data from 32 bit PCM into 16 bit PCM. I am getting some noises and some real song data. Need help...
```
Private Function FX32TO16(ByVal input As Byte(), ByVal len As Integer) As Byte()
Dim output As Byte() = New Byte(len / 2 - 1) {}
Dim outputIndex As Integer = 0
For n As Integer = 0 To len - 1 Step 4
output(outputIndex) = input(n + 2)
output(outputIndex + 1) = input(n + 3)
outputIndex += 2
Next
Return output
End Function
```
I was making software to record system volume using LoopBackCapture. Its capturing data of 32 bit PCM ( 32 bit PCM: 48kHz 2 channels wBitsPerSample:32 dwChannelMask:3 subFormat:00000003-0000-0010-8000-00aa00389b71 extraSize:22 )
I want to convert it into a 16 bit stereo data....I am not able to get it...
Its my code to convert the data from 32 bit PCM into 16 bit PCM. I am getting some noises and some real song data. Need help...
```
Private Function FX32TO16(ByVal input As Byte(), ByVal len As Integer) As Byte()
Dim output As Byte() = New Byte(len / 2 - 1) {}
Dim outputIndex As Integer = 0
For n As Integer = 0 To len - 1 Step 4
output(outputIndex) = input(n + 2)
output(outputIndex + 1) = input(n + 3)
outputIndex += 2
Next
Return output
End Function
```