Skip to content

Smoother playhead #9441

Closed

Description

@saintmatthieu

Problem to be solved

At the moment, the position of the playhead is updated on the audio hardware thread.
The frequency of these calls depends on the audio buffer setting from the preferences. By default, we request 100ms, which means an update rate of 10fps, which is slow.

Your idea

An alternative implementation would be:

  • relocate this functionality on the audio thread (not the hardware thread)
  • create a dedicated class for this, which has access to the playback policy (so that it knows if looping back)
  • each time we push a block of samples for the audio thread to consume, update the playhead position to the first sample of that block
  • at a desired refresh rate, extrapolate (or "guess") the intermediary playhead position

Activity

  1. added
    Enhancement Request
    on Sep 23, 2025
  2. DavidBailes commented on Sep 26, 2025

    @DavidBailes
    Collaborator

    @saintmatthieu .
    Users of screen readers often position the playback cursor, and the start and end of selection on the basis of the audio they hear during playback - eg they stop playback when they get to a certain point in the audio.
    So ideally, the position of the playback cursor should be synchronised which the audio being played back through the computers speakers/headphones.
    Although this isn't exactly the case in AU3, it would be good if any changes you make at least don't make the situation any worse.
    The following paper raises the issue of this synchronisation:
    http://www.rossbencina.com/static/writings/portaudio_sync_acmc2003.pdf

  3. added
    P1
    on Sep 26, 2025
  4. moved this from Design - Todo to Ready for Dev in [AU4] Main Board(archive)on Sep 26, 2025
  5. saintmatthieu commented on Sep 26, 2025

    @saintmatthieu
    ContributorAuthor

    the position of the playback cursor should be synchronised which the audio being played back through the computers speakers/headphones

    @DavidBailes this is exactly what I will be aiming for.

  6. DavidBailes commented on Sep 26, 2025

    @DavidBailes
    Collaborator

    the position of the playback cursor should be synchronised which the audio being played back through the computers speakers/headphones

    @DavidBailes this is exactly what I will be aiming for.

    @saintmatthieu
    Thanks, that's great!

  7. moved this from Ready for Dev to In Progress in [AU4] Main Board(archive)on Oct 8, 2025
  8. changed the title [-]Snappier playhead[/-] [+]Smoother playhead[/+] on Oct 9, 2025
  9. moved this from In Progress to Code Review in [AU4] Main Board(archive)on Oct 9, 2025
  10. moved this from Code Review to In Progress in [AU4] Main Board(archive)on Oct 16, 2025
  11. moved this from In Progress to Code Review in [AU4] Main Board(archive)on Oct 17, 2025
  12. moved this from Code Review to Ready for QA in [AU4] Main Board(archive)on Oct 23, 2025
  13. moved this from Ready for QA to In QA in [AU4] Main Board(archive)on Oct 23, 2025
  14. self-assigned this
    on Oct 23, 2025
  15. chinakov commented on Oct 24, 2025

    @chinakov
    Contributor

    Tested, thanks!

  16. moved this from In QA to Ready for Merge in [AU4] Main Board(archive)on Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Enhancement RequestP1

Fields

Priority

None yet

Effort

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions