webMUSHRA icon indicating copy to clipboard operation
webMUSHRA copied to clipboard

MushraAudioControl.convolve() don't handle 96kHz samplerate

Open a7brusco opened this issue 2 years ago • 2 comments

I was testing webmushra which works well with my configuration (I use pymushra to serve the website). A colleague tested it and had some trouble getting the index page (with the default configuration). After debugging, we discovered that his Audio Context was running at 96 kHz sample rate (mine was 48 kHz). The error that crashes the website occurs when the MushraAudioControl calls the convolve method. To solve this problem, we change the sample rate of the audio interface in the Windows settings to 48 kHz.

Here is the console log of his Chrome while running pymushra. webmushra_error

a7brusco avatar Aug 10 '22 11:08 a7brusco

Uh. I didn't know that browser do support >48khz these days.

Not sure how to solve this. Any ideas yourself?

faroit avatar Aug 10 '22 11:08 faroit

I'm not very good with all the web stuff. I've been practicing a bit with the WebAudio API (just enough to debug this problem).

I noticed that the convolve method of MushraAudioControl could not work because it does not get the _coefficient parameter.

Maybe adding the low-pass coefficients for 96kHz in the createLowerAnchor35 and createLowerAnchor70 method is enough to solve the problem.

a7brusco avatar Aug 10 '22 11:08 a7brusco