From e7471f589aa028a30c40d734efb7a3fd8fa36dd1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 22 Dec 2010 08:29:14 +0100 Subject: input/cdda: import missing pcm16_to_wave() from the wave encoder --- src/input/cdda_input_plugin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/input') diff --git a/src/input/cdda_input_plugin.c b/src/input/cdda_input_plugin.c index df54ed47d..a0cb7e14b 100644 --- a/src/input/cdda_input_plugin.c +++ b/src/input/cdda_input_plugin.c @@ -309,6 +309,17 @@ input_cdda_seek(struct input_stream *is, return true; } +static inline size_t +pcm16_to_wave(uint16_t *dst16, const uint16_t *src16, size_t length) +{ + size_t cnt = length >> 1; + while (cnt > 0) { + *dst16++ = GUINT16_TO_LE(*src16++); + cnt--; + } + return length; +} + static size_t input_cdda_read(struct input_stream *is, void *ptr, size_t length, GError **error_r) -- cgit v1.2.3