Skip to content

retool api for 0.5.0 (start, state, sync, buffers, timeline) #25

Description

@bvibber

Visible API retooling:

  • add 'paused' property on AudioFeeder
  • guarantee that playbackPosition increases monotonically, except when:
  • allow resetting playbackPosition along (with a flush() or not?) in reset() method
  • allow compensating for late frames with delay(seconds) method -- injects compensatory silence into the output stream and stops playbackPosition from increasing until the compensation time has passed
    • use this to avoid constant stop()/start() if we're having frame delays; we'll be "actually" back in sync after the next bufferDuration -- that's about 4-5 frames at 24 fps, 5-6 frames at 30fps, 8-10 frames at 60fps
  • split out partial interface as TimelineProvider
    • start()
    • stop()
    • reset(newStartTime)
    • delay(seconds)
    • playbackPosition

Flash backend retooling:

  • send the playback state from Flash to JS on every call/callback
  • flush the output buffer from JS to Flash, if any, on every call/callback (?)

Web Audio backend retooling:

  • merge the BufferQueue JS class with the BufferQueue AS class; avoid pre-chunking output by using linked list, and output more cleanly without splitting/merging buffers when not needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions