diff options
author | Max Kellermann <max@duempel.org> | 2012-04-19 23:47:23 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-04-23 21:54:09 +0200 |
commit | ec931143479e67042d2393435b2f4e91235edae6 (patch) | |
tree | 83b481c9b245094c2835fdc2063f75e2074f6157 | |
parent | df1c5ce3145253fa3cd0611cefac11ee6f85a063 (diff) | |
download | mpd-ec931143479e67042d2393435b2f4e91235edae6.tar.gz mpd-ec931143479e67042d2393435b2f4e91235edae6.tar.xz mpd-ec931143479e67042d2393435b2f4e91235edae6.zip |
pcm_export: consider the pack24 flag in _source_size()
-rw-r--r-- | src/pcm_export.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |