aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_parser.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-01 00:25:08 +0100
committerMax Kellermann <max@duempel.org>2012-03-01 01:15:22 +0100
commit25164969932590894671895944f30743d344e541 (patch)
tree80cdce06ec46865c7de0d228441fba4c8178f4f7 /src/audio_parser.c
parent3b565b5f972ad65ab3e498c29eaf4f825eacece4 (diff)
downloadmpd-25164969932590894671895944f30743d344e541.tar.gz
mpd-25164969932590894671895944f30743d344e541.tar.xz
mpd-25164969932590894671895944f30743d344e541.zip
audio_format: add DSD sample format
Basic support for Direct Stream Digital. No conversion yet, and no decoder/output plugin support.
Diffstat (limited to '')
-rw-r--r--src/audio_parser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/audio_parser.c b/src/audio_parser.c
index 8875239e1..7061e0e00 100644
--- a/src/audio_parser.c
+++ b/src/audio_parser.c
@@ -87,6 +87,18 @@ parse_sample_format(const char *src, bool mask,
return true;
}
+ if (memcmp(src, "dsd", 3) == 0) {
+ if (src[3] == 'l') {
+ *sample_format_r = SAMPLE_FORMAT_DSD_LSBFIRST;
+ *endptr_r = src + 4;
+ } else {
+ *sample_format_r = SAMPLE_FORMAT_DSD;
+ *endptr_r = src + 3;
+ }
+
+ return true;
+ }
+
value = strtoul(src, &endptr, 10);
if (endptr == src) {
g_set_error(error_r, audio_parser_quark(), 0,