diff options
Diffstat (limited to 'src/pcm_export.c')
-rw-r--r-- | src/pcm_export.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/pcm_export.c b/src/pcm_export.c index 144ac71c..b430318e 100644 --- a/src/pcm_export.c +++ b/src/pcm_export.c @@ -19,7 +19,6 @@ #include "config.h" #include "pcm_export.h" -#include "pcm_dsd_usb.h" #include "pcm_pack.h" #include "util/byte_reverse.h" @@ -28,30 +27,20 @@ pcm_export_init(struct pcm_export_state *state) { pcm_buffer_init(&state->reverse_buffer); pcm_buffer_init(&state->pack_buffer); - pcm_buffer_init(&state->dsd_buffer); } void pcm_export_deinit(struct pcm_export_state *state) { pcm_buffer_deinit(&state->reverse_buffer); pcm_buffer_deinit(&state->pack_buffer); - pcm_buffer_deinit(&state->dsd_buffer); } void pcm_export_open(struct pcm_export_state *state, - enum sample_format sample_format, unsigned channels, - bool dsd_usb, bool shift8, bool pack, bool reverse_endian) + enum sample_format sample_format, + bool shift8, bool pack, bool reverse_endian) { assert(audio_valid_sample_format(sample_format)); - assert(!dsd_usb || audio_valid_channel_count(channels)); - - state->channels = channels; - state->dsd_usb = dsd_usb && sample_format == SAMPLE_FORMAT_DSD; - if (state->dsd_usb) - /* after the conversion to DSD-over-USB, the DSD - samples are stuffed inside fake 24 bit samples */ - sample_format = SAMPLE_FORMAT_S24_P32; state->shift8 = shift8 && sample_format == SAMPLE_FORMAT_S24_P32; state->pack24 = pack && sample_format == SAMPLE_FORMAT_S24_P32; @@ -81,13 +70,6 @@ pcm_export_frame_size(const struct pcm_export_state *state, /* packed 24 bit samples (3 bytes per sample) */ return audio_format->channels * 3; - if (state->dsd_usb) - /* the DSD-over-USB draft says that DSD 1-bit samples - are enclosed within 24 bit samples, and MPD's - representation of 24 bit is padded to 32 bit (4 - bytes per sample) */ - return audio_format->channels * 4; - return audio_format_frame_size(audio_format); } @@ -95,10 +77,6 @@ const void * pcm_export(struct pcm_export_state *state, const void *data, size_t size, size_t *dest_size_r) { - if (state->dsd_usb) - data = pcm_dsd_to_usb(&state->dsd_buffer, state->channels, - data, size, &size); - if (state->pack24) { assert(size % 4 == 0); @@ -152,9 +130,5 @@ pcm_export_source_size(const struct pcm_export_state *state, size_t size) /* 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; - return size; } |