Skip to content

Channel difference handling#290

Open
taishi-sama wants to merge 2 commits intopdeljanov:rel-0.5from
taishi-sama:channel_difference_handling
Open

Channel difference handling#290
taishi-sama wants to merge 2 commits intopdeljanov:rel-0.5from
taishi-sama:channel_difference_handling

Conversation

@taishi-sama
Copy link
Copy Markdown

@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.

2 participants