Open bjornm opened 10 years ago
This is subjugated to WebAudio/web-audio-api#300.
Makes sense as audio context contructor property. Will keep for v.next.
Virtual F2F:
TPAC 2020:
AudioBufferSourceNode
and AudioContext
resampling quality/cost/latency trade-off at construction would be enoughVirtual 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.
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?