diff options
author | Max Kellermann <max@duempel.org> | 2012-03-27 01:18:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-03-27 01:22:50 +0200 |
commit | a2b5db00037bd4e0604643eaa67e7a0dd978bb8a (patch) | |
tree | 9da34480c749136e581f91c0a3b4086e330085c2 /src/pcm_convert.c | |
parent | 2803ec2e96096dfc461f3e9a522e27b23453d076 (diff) | |
download | mpd-a2b5db00037bd4e0604643eaa67e7a0dd978bb8a.tar.gz mpd-a2b5db00037bd4e0604643eaa67e7a0dd978bb8a.tar.xz mpd-a2b5db00037bd4e0604643eaa67e7a0dd978bb8a.zip |
audio_format: remove SAMPLE_FORMAT_DSD_OVER_USB
DSD-over-USB should not be a MPD core format, because it is not a
"natural" format; it is just a temnporary over-the-wire format. This
format has been implemented in pcm_export, and does not need to be
supported by pcm_convert.
Diffstat (limited to 'src/pcm_convert.c')
-rw-r--r-- | src/pcm_convert.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/pcm_convert.c b/src/pcm_convert.c index f19a95223..63f9a1b98 100644 --- a/src/pcm_convert.c +++ b/src/pcm_convert.c @@ -22,7 +22,6 @@ #include "pcm_channels.h" #include "pcm_format.h" #include "pcm_pack.h" -#include "pcm_dsd_usb.h" #include "audio_format.h" #include "glib_compat.h" @@ -76,7 +75,6 @@ pcm_convert_channels(struct pcm_buffer *buffer, enum sample_format format, case SAMPLE_FORMAT_S8: case SAMPLE_FORMAT_FLOAT: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: g_set_error(error_r, pcm_convert_quark(), 0, "Channel conversion not implemented for format '%s'", sample_format_to_string(format)); @@ -326,40 +324,6 @@ pcm_convert(struct pcm_convert_state *state, size_t *dest_size_r, GError **error_r) { - struct audio_format usb_format; - - if (src_format->format == SAMPLE_FORMAT_DSD && - dest_format->format == SAMPLE_FORMAT_DSD_OVER_USB) { - size_t u_size; - const uint32_t *u = pcm_dsd_to_usb(&state->dsd.buffer, - src_format->channels, - src, src_size, - &u_size); - if (u == NULL) { - g_set_error_literal(error_r, pcm_convert_quark(), 0, - "DSD to USB conversion failed"); - return NULL; - } - - usb_format = *src_format; - usb_format.format = SAMPLE_FORMAT_DSD_OVER_USB; - - /* each DSD-over-USB sample contains 2 DSD bytes (16 - DSD bits), which means the sample rate must be - halved; this is not the real 1 bit sample rate, but - MPD's point of view */ - usb_format.sample_rate = usb_format.sample_rate / 2; - - if (audio_format_equals(&usb_format, dest_format)) { - *dest_size_r = u_size; - return u; - } - - src_format = &usb_format; - src = u; - src_size = u_size; - } - struct audio_format float_format; if (src_format->format == SAMPLE_FORMAT_DSD) { size_t f_size; |