Skip to content

Playback rate affects position when unpausing #48

@bobsayshilol

Description

@bobsayshilol

Description

The position jumps around depending on the current playback rate when unpausing.

Expected Behavior

Hitting play after pause should continue from where it was paused.

Steps to Reproduce

  1. Load any song
  2. Click ~half way through the song in the waveform viewer
  3. Increase the playback rate
  4. Play -> pause -> play -> pause -> play -> pause
  5. Observe that the current position jumps backwards

Alternatively, decrease the playback rate and observe that the current position jumps forwards (assuming there's enough song left)

Environment

  • App Version: 0.5.0
  • Device: Desktop
  • OS: Linux
  • Browser: Firefox

Additional Context

My guess is that it's this division (or lack of a corresponding division in pause()) that's causing the issue since the jump is proportional to the playback rate:

this.startTime = this.context.currentTime - actualOffset / this.playbackRate;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions