Open vigata opened 13 years ago
Yes, it is a known problem. Chrome doesn't really support non-standard sampling rates, and we are not currently resampling.
I guess it is actually playing at 48kHz.
It is on the to-do list, I'll close this issue when there is a work-around in the audio library we are using.
@JensNockert there is a work-around in the audio library we are using (ping @jussi-kalliokoski) however we're not willing to fix it because it's a browser support issue which should be fixed on the browser side: http://code.google.com/p/chromium/issues/detail?id=73062
However, this issue doesn't seem to be high-priority for them, I think Chris & co have better things to do right now.
Not entirely related, but it would be waaaay cool to control the speed/pitch on playback. That could allow for some nifty audio experiments in browser.
Wow nice idea! And I'm actually implementing a Resampler class into sink.js, allowing people to attach multiple sources of varying sample rates to the same sink. It would make that possible. :D
Wow, that would be killer. If you get it working, I have a badass project I could demo it with.
@kilokeith @jussi-kalliokoski Let me know when you get something running, I'd be happy to feature it on ofmlabs.org if you wanted :)
@nddrylliog In that case, I'm soft launching an audio centered Soundcloud + Three.js experiment today: http://www.webuiltthishouse.com/ (sorry for spamming this issue up)
@jussi. does your resampler in sink.js use filtered resampling? Meaning it just doesn't drop/repeat samples to meet the target sampling rate?
@concalma nope, not yet, it's in baby boots right now, all it has is two interpolation methods (nearest-neighbour and linear) and no extrapolation methods at all, contributions welcome ^^ also, it's not even working quite yet. It's in the branch resampler
.
@jussi I'll take a look if I have some time. How about porting some of the code from libsamplerate http://www.mega-nerd.com/SRC/ libsample rate is a very decent audio resampling library with which you can make tradeoffs of quality vs speed.
@concalma thanks a lot for the reference, looks like a good idea!
On Chrome 15.0.874.120 the player at http://jsmad.org/ plays a regular 44100hz MP3 faster than it should. Pitch is clearly higher.