Commit b9de3270 authored by Max Kellermann's avatar Max Kellermann

decoder/flac: specialize "stereo" for all bit depths

parent 590d6fae
...@@ -47,6 +47,9 @@ static void ...@@ -47,6 +47,9 @@ static void
FlacImport(T *dest, const FLAC__int32 *const src[], size_t n_frames, FlacImport(T *dest, const FLAC__int32 *const src[], size_t n_frames,
unsigned n_channels) unsigned n_channels)
{ {
if (n_channels == 2)
FlacImportStereo(dest, src, n_frames);
else
FlacImportAny(dest, src, n_frames, n_channels); FlacImportAny(dest, src, n_frames, n_channels);
} }
...@@ -58,10 +61,7 @@ flac_convert(void *dest, ...@@ -58,10 +61,7 @@ flac_convert(void *dest,
{ {
switch (sample_format) { switch (sample_format) {
case SampleFormat::S16: case SampleFormat::S16:
if (num_channels == 2) FlacImport((int16_t *)dest, buf, n_frames, num_channels);
FlacImportStereo((int16_t *)dest, buf, n_frames);
else
FlacImportAny((int16_t *)dest, buf, n_frames, num_channels);
break; break;
case SampleFormat::S24_P32: case SampleFormat::S24_P32:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment