summaryrefslogtreecommitdiff
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-03 11:40:06 +0200
committerMax Kellermann <max@musicpd.org>2019-08-03 11:40:06 +0200
commit51abed9732f9b84723a96d64104f9707a40d2e45 (patch)
tree71de8459296d66dc25dbb68d49bd88c57ae46245 /src/decoder
parentd00afc912cae96b00e3730920572ee4f1d22a846 (diff)
decoder/mad: pass mad_pcm to mad_fixed_to_24_buffer()
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/plugins/MadDecoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx
index 083f7f978..5d3cb5fec 100644
--- a/src/decoder/plugins/MadDecoderPlugin.cxx
+++ b/src/decoder/plugins/MadDecoderPlugin.cxx
@@ -89,13 +89,13 @@ mad_fixed_to_24_sample(mad_fixed_t sample) noexcept
}
static void
-mad_fixed_to_24_buffer(int32_t *dest, const struct mad_synth *synth,
+mad_fixed_to_24_buffer(int32_t *dest, const struct mad_pcm &src,
unsigned int start, unsigned int end,
unsigned int num_channels)
{
for (unsigned i = start; i < end; ++i)
for (unsigned c = 0; c < num_channels; ++c)
- *dest++ = mad_fixed_to_24_sample(synth->pcm.samples[c][i]);
+ *dest++ = mad_fixed_to_24_sample(src.samples[c][i]);
}
static bool
@@ -848,7 +848,7 @@ MadDecoder::SubmitPCM(unsigned i, unsigned pcm_length) noexcept
{
unsigned int num_samples = pcm_length - i;
- mad_fixed_to_24_buffer(output_buffer, &synth,
+ mad_fixed_to_24_buffer(output_buffer, synth.pcm,
i, i + num_samples,
MAD_NCHANNELS(&frame.header));
num_samples *= MAD_NCHANNELS(&frame.header);