lovr icon indicating copy to clipboard operation
lovr copied to clipboard

Sound:setPlaybackRate

Open nevyn opened this issue 3 years ago • 2 comments

nevyn avatar Jan 18 '22 13:01 nevyn

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 :setPlaybackRate and :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.

bjornbytes avatar Feb 21 '22 22:02 bjornbytes

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.

bjornbytes avatar Mar 16 '22 19:03 bjornbytes

Applied in d8c23bacec733482afbf56fd57749132de14aa8d as Source:setPitch. Thanks for the PR for this.

bjornbytes avatar Sep 12 '22 03:09 bjornbytes