audio_format: basic support for floating point samples
Support for conversion from float to 16, 24 and 32 bit integer samples.
This commit is contained in:
@@ -81,6 +81,12 @@ parse_sample_format(const char *src, bool mask,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*src == 'f') {
|
||||
*sample_format_r = SAMPLE_FORMAT_FLOAT;
|
||||
*endptr_r = src + 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
value = strtoul(src, &endptr, 10);
|
||||
if (endptr == src) {
|
||||
g_set_error(error_r, audio_parser_quark(), 0,
|
||||
|
Reference in New Issue
Block a user