input/cdda: import missing pcm16_to_wave() from the wave encoder

This commit is contained in:
Max Kellermann 2010-12-22 08:29:14 +01:00
parent 24208be5cf
commit e7471f589a
1 changed files with 11 additions and 0 deletions

View File

@ -309,6 +309,17 @@ input_cdda_seek(struct input_stream *is,
return true; 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 static size_t
input_cdda_read(struct input_stream *is, void *ptr, size_t length, input_cdda_read(struct input_stream *is, void *ptr, size_t length,
GError **error_r) GError **error_r)