Open hales548 opened 4 years ago
It's been a few years since I've worked on this, so I'm not 100% sure this is the right fix, but I think you would need to replace
output.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true);
on line 199 of webworker.js with
output.setInt32(offset, s < 0 ? s * 0x80000000 : s * 0x7FFFFFFF, true);
in order to get 32bit output for WAV.
For MP3, you would need to replace the float32toInt function
with
function float32ToInt(f32){
return new Int32Array(f32);
}
This should work, as it inputs 32 bit raw audio to the audio encoders (mp3/ogg etc..), but I don't know 100%, because the actual audio encoders all have different settings, and I didn't write the encoders myself, I just ported different audio encoding libraries and put them together, so you'd need to test that the audio encoders actually output 32 bit audio when you do this.
I can see if I can test this and put in a patch in the next month or so.
Hi Sam
Many thanks for this. If you manage to put in a patch that would help.
All the best.
How do you get the script to record at 24 or 32 bit?