1

We use the RecordRTC library to record user audio to our system.

But an user got this error:

Uncaught sample-rate must be under range 22050 and 96000

And I'm not sure what does it mean, as far as I could find on google it has something to do with his hardware (mic or headphone). Is that correct? There's nothing much about it.

RecordRTC library: https://www.webrtc-experiment.com/RecordRTC/

Brayan
  • 460
  • 2
  • 5
  • 17
  • Are you setting a custom sample-rate? According to the code it has to be between those two values. – Owlvark Oct 10 '14 at 15:32
  • No I'm not, it's the default one. But the question is, why only this user got this error? It works for me when I tested and also for all other users (it was the first complaint) – Brayan Oct 10 '14 at 15:49

1 Answers1

1

I expect the user is using an audio card with a sample rate higher than 96000. I just had a bug report yesterday from a user using a 192k sound card.

cwilso
  • 13,610
  • 1
  • 30
  • 35
  • Hmm that would be a reasonable explanation. What was the solution? I guess increasing the sample rate parameter would result in more processing and higher the file size right? – Brayan Oct 10 '14 at 16:59
  • 1
    Yes, the higher the sample rate the more processing has to occur (and the bigger the file size). In this case, the RecordRTC library seems to be hardcoding those values - line 828 of RecordRTC.js - and it seems like you could just change the limits. Other than that, your only choice is to have the user manually drop the sample rate on the default device. – cwilso Oct 13 '14 at 16:50