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:
@@ -212,6 +212,9 @@ get_bitformat(enum sample_format sample_format)
|
||||
|
||||
case SAMPLE_FORMAT_S32:
|
||||
return SND_PCM_FORMAT_S32;
|
||||
|
||||
case SAMPLE_FORMAT_FLOAT:
|
||||
return SND_PCM_FORMAT_FLOAT;
|
||||
}
|
||||
|
||||
assert(false);
|
||||
|
||||
@@ -395,6 +395,7 @@ sample_format_to_oss(enum sample_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case SAMPLE_FORMAT_UNDEFINED:
|
||||
case SAMPLE_FORMAT_FLOAT:
|
||||
return AFMT_QUERY;
|
||||
|
||||
case SAMPLE_FORMAT_S8:
|
||||
|
||||
Reference in New Issue
Block a user