Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

audio plays faster than it should #27

Open
vigata opened this issue Nov 16, 2011 · 11 comments
Open

audio plays faster than it should #27

vigata opened this issue Nov 16, 2011 · 11 comments

Comments

@vigata
Copy link

vigata commented Nov 16, 2011

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.

@auroranockert
Copy link
Collaborator

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.

@nddrylliog
Copy link
Collaborator

@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.

@kilokeith
Copy link

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.

@jussi-kalliokoski
Copy link

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

@kilokeith
Copy link

Wow, that would be killer. If you get it working, I have a badass project I could demo it with.

@nddrylliog
Copy link
Collaborator

@kilokeith @jussi-kalliokoski Let me know when you get something running, I'd be happy to feature it on ofmlabs.org if you wanted :)

@kilokeith
Copy link

@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)

@vigata
Copy link
Author

vigata commented Dec 2, 2011

@jussi. does your resampler in sink.js use filtered resampling? Meaning it just doesn't drop/repeat samples to meet the target sampling rate?

@jussi-kalliokoski
Copy link

@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.

@vigata
Copy link
Author

vigata commented Dec 2, 2011

@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.

@jussi-kalliokoski
Copy link

@concalma thanks a lot for the reference, looks like a good idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants