Skip to content

Editor cannot add a second overlapping audio region on a separate track #322

@meiiie

Description

@meiiie

Describe the bug

The editor cannot add a second audio region when the playhead is already inside an existing audio region, even though the timeline already supports multiple audio rows internally.

To Reproduce

  1. Open a video in the editor.
  2. Add one audio region that spans across the current playhead position.
  3. Try to add another audio file while the playhead is still inside that existing region.
  4. The editor blocks the add with "Cannot place audio here" instead of creating a second audio region on another track.

Expected behavior

If multiple audio tracks are supported, adding a second audio region should be able to place it on a separate audio track instead of rejecting it just because track 0 already overlaps at the current position.

Additional context

Current source already has the concept of multiple audio rows (AudioRegion.trackIndex and getAudioTrackRowId(...) in the timeline), but the Add Audio flow in TimelineEditor still:

  • always calls onAudioAdded(...) without a trackIndex, so new regions default to track 0
  • rejects the add whenever the current playhead is inside any existing audio region, before a different track can even be considered

That matches the symptom reported in #319 where adding another audio track only works after cutting the first track or placing the new audio beside it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions