lovr
lovr copied to clipboard
Sound:setPlaybackRate
Some ideas
- Sources should set their playback rate to 1.0 when created.
- There should be a getter so you can see what the playback rate is.
- Should clones inherit the playback rate from their parent?
- Is there a converter-related race condition between
:setPlaybackRateand:clone? I think as long as the clone reads the playback rate from its parent once and then configures its converter using that value, things would be okay.
Note: enabling dynamic sample rate on a miniaudio data converter disables passthrough optimizations, but this is okay for us since we skip creating the converter altogether when no conversion is necessary.
Applied in d8c23bacec733482afbf56fd57749132de14aa8d as Source:setPitch. Thanks for the PR for this.