WebAudio / web-audio-api

The Web Audio API v1.0, developed by the W3C Audio WG
https://webaudio.github.io/web-audio-api/
Other
1.05k stars 167 forks source link

Configurable sample rate conversion quality #2398

Open bjornm opened 10 years ago

bjornm commented 10 years ago

I would like a way to control the sample rate conversion quality applied when the AudioContext.sampleRate does not match the underlying output device. The quality could be described as e.g. low latency, low cpu (linear interpolation) or high quality (FIR convolution). This should preferably be configurable at runtime to adapt to host performance. Example:

enum SampleRateConversionQuality { "fastest", // no interpolation at all "fast", // linear interpolation "normal", // fir convolution .. }

audioContext.sampleRateConversionQuality = ...;

SampleRateConversionQuality would also make sense for AudioBufferSourceNodes with playbackRate != 1 and possibly for WaveShapers with upsampling. Maybe some other nodes as well?

I'm unsure as to whether these settings make sense in all situations. E.g. would it make sense to use no interpolation at all for an upsampled waveshaper when the whole purpose of upsampling is to increase quality?

cwilso commented 9 years ago

This is subjugated to WebAudio/web-audio-api#300.

mdjp commented 6 years ago

Makes sense as audio context contructor property. Will keep for v.next.

padenot commented 4 years ago

Virtual F2F:

padenot commented 4 years ago

TPAC 2020:

rtoy commented 3 years ago

Virtual F2F 2021: Everything from https://github.com/WebAudio/web-audio-api-v2/issues/25#issuecomment-713708269 still stands, but we'll probably only do this for an AudioContext and AudioBufferSourceNode.