web audio: Properly sample-rate convert audio assets in chromium port
Created attachment 86727 [details] Patch
In looking over this again, I see that it would be more efficient to mix-to-mono first, before sample-rate converting. I'll upload a new patch changing that part, but the other parts can still be reviewed...
I also need to conditionally compile AudioBus::createBySampleRateConverting for chromium-only, or provide an implementation for the mac-port as well. It's not actually needed for the mac port, so will probably conditionally compile.
Comment on attachment 86727 [details] Patch Looks fine to me. Why don't you upload the final version of the patch and I'll r+ that.
Created attachment 86835 [details] Patch
AudioBus::createBySampleRateConverting() is now not compiled in for the mac port, since it's not needed there. I added #if ENABLE(WEB_AUDIO) to SincResampler which was missing it before. For efficiency, the resampling now first mixes down to mono (if necessary)
Looks good. r=me
Created attachment 86853 [details] Patch
Sorry, Ken I just uploaded another patch with a very minor change to conditionally include: #if !PLATFORM(MAC) #include "SincResampler.h" #endif
Comment on attachment 86853 [details] Patch OK.
Comment on attachment 86853 [details] Patch Clearing flags on attachment: 86853 Committed r81931: <http://trac.webkit.org/changeset/81931>
All reviewed patches have been landed. Closing bug.