Skip to content

internal/mux: preserve buffered audio on an unsupported seek - #304

Open
kumagi wants to merge 1 commit into
ebitengine:mainfrom
kumagi:codex/mux-seek-source-check
Open

kumagi wants to merge 1 commit into
ebitengine:mainfrom
kumagi:codex/mux-seek-source-check

Conversation

@kumagi

@kumagi kumagi commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What issue is this addressing?

None

What type of issue is this addressing?

bug

What this PR does | solves

Seeking a player whose source does not implement io.Seeker currently discards its buffered audio before returning an error. Check the source first so that an unsupported seek leaves the buffered data and playback state intact.

The regression test covers playing and paused players, and verifies that the buffered samples can still be played after the error. It fails on main because the buffer becomes empty. Successful seeks and errors returned by an underlying io.Seeker retain their existing behavior.

Validation: go test ./..., go test -race ./internal/mux, and go vet ./... pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant