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