Repository navigation
Conversation
Use symmetric rounding for signed PCM samples and clamp the result before converting to 16-bit.
Calculating the byte count first can leave a partial frame even for 16-bit mono. At 44110 Hz the old calculation gives 5513 bytes per buffer. The player can only fill 5512 bytes with complete samples, but submits all 5513. OpenAL implementations that require whole PCM frames can reject the upload, leaving the queue without that audio. Round down in frames so the buffer size matches the audio it holds.
Run the transform on each channel before combining power so opposite-phase signals remain visible.
Enable stereo after the caches, playback backends, and renderers support interleaved frames. Update the existing converter test to expect stereo samples.
Keep FFMS2's layout-aware downmix and use a stereo matrix for providers without speaker metadata. Let AviSynth use the shared converter in place of its mono-only preference.
rcombs
marked this pull request as ready for review
November 28, 2026 02:14
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aegisub currently downmixes stereo sources to mono before playback. This preserves the left and right channels through decoding, caching, and playback. Surround sources are mixed to stereo. The waveform uses peaks from both channels, and the spectrum combines their power so opposite-phase sounds remain visible.
OpenAL playback on macOS was tested and works well. The macOS build and Meson test suite passed, including a separate native OpenAL run that verified stereo buffer format and frame alignment.
Before merging, please validate stereo playback on the other platforms and backends, especially DirectSound on Windows and the Linux audio backends.
🤖 Codex