From ec931143479e67042d2393435b2f4e91235edae6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Apr 2012 23:47:23 +0200 Subject: pcm_export: consider the pack24 flag in _source_size() --- src/pcm_export.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pcm_export.c b/src/pcm_export.c index 824b41b18..144ac71cd 100644 --- a/src/pcm_export.c +++ b/src/pcm_export.c @@ -148,6 +148,10 @@ pcm_export(struct pcm_export_state *state, const void *data, size_t size, size_t pcm_export_source_size(const struct pcm_export_state *state, size_t size) { + if (state->pack24) + /* 32 bit to 24 bit conversion (4 to 3 bytes) */ + size = (size / 3) * 4; + if (state->dsd_usb) /* DSD over USB doubles the transport size */ size /= 2; -- cgit v1.2.3