We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c141420 + 36da7b4 commit 7c1401fCopy full SHA for 7c1401f
src/AudioTools/Filter.h
@@ -419,7 +419,7 @@ class ConverterNChannels : public BaseConverter<T> {
419
420
// convert all samples for each channel separately
421
size_t convert(uint8_t *src, size_t size) {
422
- int count = size / channels;
+ int count = size / channels / sizeof(T);
423
T *sample = (T *)src;
424
for (size_t j = 0; j < count; j++) {
425
for (int channel = 0; channel < channels; channel++) {
@@ -437,4 +437,4 @@ class ConverterNChannels : public BaseConverter<T> {
437
int channels;
438
};
439
440
-} // namespace audio_tools
+} // namespace audio_tools
0 commit comments