pcm_export: consider the pack24 flag in _source_size()

This commit is contained in:
Max Kellermann 2012-04-19 23:47:23 +02:00
parent df1c5ce314
commit ec93114347
1 changed files with 4 additions and 0 deletions

View File

@ -148,6 +148,10 @@ pcm_export(struct pcm_export_state *state, const void *data, size_t size,
size_t size_t
pcm_export_source_size(const struct pcm_export_state *state, size_t size) 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) if (state->dsd_usb)
/* DSD over USB doubles the transport size */ /* DSD over USB doubles the transport size */
size /= 2; size /= 2;