audio_format: add DSD sample format

Basic support for Direct Stream Digital.  No conversion yet, and no
decoder/output plugin support.
This commit is contained in:
Max Kellermann
2012-03-01 00:25:08 +01:00
parent 3b565b5f97
commit 2516496993
11 changed files with 61 additions and 0 deletions

View File

@@ -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,