kbumsik / opus-media-recorder

MediaRecorder polyfill for Opus recording using WebAssembly
http://kbumsik.io/opus-media-recorder/
Other
308 stars 39 forks source link

how to change WAV bit depth #54

Open MartinBarker opened 2 years ago

MartinBarker commented 2 years ago

Hello, I know this project is derived/influenced by opus-recorder, and in their readme file I can see that there is an option for wavBitDepth under 'Config options for WAV recorder'

https://github.com/chris-rudmin/opus-recorder#config-options-for-wav-recorder

I have a fork of opus-media-recorder:

https://github.com/MartinBarker/opus-media-recorder

Where I changed some getUserMedia config values to try and get higher audio quality:

buttonCreate.onclick = () => {
  navigator.mediaDevices.getUserMedia({
    audio: {
      autoGainControl: false,
      echoCancellation: false,
      noiseSuppression: false,
      channelCount:2,
      //sampleSize: 24,
      sampleRate: 44100,

    }, 
    "mandatory": {
      "googEchoCancellation": "false",
      "googAutoGainControl": "false",
      "googNoiseSuppression": "false",
      "googHighpassFilter": "false"
    },
    video: false
  })

But I can't seem to find out how to change the bit depth? I would like 24 or 32 bit wav recording, which opus-recorder says it supports, but I am not sure where to add wavBitDepth into this repo opus-media-recorder in order to record wave at 32 bit.

Thanks