rodio
rodio copied to clipboard
Fixed ChannelVolume size_hint and added tests
The current implementation of size_hint for ChannelVolume is broken for two reasons:
1. The number of samples in input and result should be the same, but each sample may produce more or less elements if channel count differs
To fix this, the size hint is first divided by the source channel count, then multiplied by the result channel count.
2. The sample currently being emitted is not taken into account
To fix this, we add how many times we will emit self.current_sample (=> How many channels still remain for this sample).