Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel difference handling #290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

taishi-sama
Copy link

@taishi-sama taishi-sama commented Jun 20, 2024

On Windows this test player is requesting default audio device instead of requesting device with proper parameters.
Case with different sample rates in original audio stream and output device already explicitly handled by resampler.
But case with different amount of channels is not, so this leads to awful audio corruption and audio speedup/audio slowdown, for example, in case of two channels in input audio stream and 8 channels in output device audiostream (and in reversal).
This pull request makes resampler fill bytes, corresponded to unused channels, in interleaved buffer with MID value (or drop channels if amount of channels in output stream lesser than amount of channels in input stream), so everything goes in proper place.
This would be useful for anybody who will use this player as example for their projects or for easier testing of library on different configurations for Windows developers.

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