Skip to content

fix(audio-openal): restore narrator speech streams#111

Merged
fbraz3 merged 1 commit into
mainfrom
fix/audio-narrator-issue
Apr 27, 2026
Merged

fix(audio-openal): restore narrator speech streams#111
fbraz3 merged 1 commit into
mainfrom
fix/audio-narrator-issue

Conversation

@fbraz3

@fbraz3 fbraz3 commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes a narrator speech regression introduced while restoring briefing video audio in commit c0ce9f0.

Mission intro speech and victory narration were silently dropped on OpenAL builds because generic AT_Streaming streams could be refilled during update() but still remain stopped in the same frame, then get released by processPlayingList() before playback starts.

Root Cause

  • OpenAL stream lifecycle logic was hardened for video timing.
  • Generic speech streams have a different producer lifecycle from video streams.
  • After in-frame refill, stopped state could persist until teardown check.

Fix

  • Add a post-refill restart check in OpenALAudioStream::update() when source is AL_STOPPED/AL_INITIAL/AL_PAUSED and queued buffers are present.
  • Keep the existing video audio restoration path intact.

Validation

  • User confirmed end-to-end behavior: videos remain working and narrator speech is restored.
  • Editor diagnostics are clean for touched files.

Notes

  • Dev diary updated in docs/DEV_BLOG/2026-04-DIARY.md.
  • Lessons learned updated in docs/WORKDIR/lessons/2026-04-LESSONS.md.

Related-to #38

Restart OpenAL streams after in-frame refill when source remains stopped.

This fixes mission intro and victory narrator regression introduced while

hardening briefing-video audio in c0ce9f0, without changing the video

FFmpeg/OpenAL path that restored video audio.

Related-to #38
@fbraz3 fbraz3 merged commit 3a90c75 into main Apr 27, 2026
10 checks passed
@fbraz3 fbraz3 deleted the fix/audio-narrator-issue branch April 27, 2026 21:38
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