diff options
author | Max Kellermann <max@duempel.org> | 2010-12-22 08:29:14 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-12-22 09:43:47 +0100 |
commit | e7471f589aa028a30c40d734efb7a3fd8fa36dd1 (patch) | |
tree | 272ee8f29dc140076c46d05a33de1ee6d06b5555 | |
parent | 24208be5cf7ee381de7dd84b2412815b9a1db7ff (diff) | |
download | mpd-e7471f589aa028a30c40d734efb7a3fd8fa36dd1.tar.gz mpd-e7471f589aa028a30c40d734efb7a3fd8fa36dd1.tar.xz mpd-e7471f589aa028a30c40d734efb7a3fd8fa36dd1.zip |
input/cdda: import missing pcm16_to_wave() from the wave encoder
-rw-r--r-- | src/input/cdda_input_plugin.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) |