diff options
author | dvdli <dvdli@google.com> | 2021-02-22 17:24:30 +0800 |
---|---|---|
committer | dvdli <dvdli@google.com> | 2021-02-22 17:34:58 +0800 |
commit | b1b3582772dae244e6e3569ca6c0cc5780ffb8f3 (patch) | |
tree | be70b84ce4ba9c1e9fbcc14f86c19e0471d9e05f /src | |
parent | d7364cd3aebd62f8527c986afa7132b1f5271ed5 (diff) |
support float config and float wave file playback
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -282,6 +282,11 @@ static unsigned int pcm_format_to_alsa(enum pcm_format format) return SNDRV_PCM_FORMAT_S32_LE; case PCM_FORMAT_S32_BE: return SNDRV_PCM_FORMAT_S32_BE; + + case PCM_FORMAT_FLOAT_LE: + return SNDRV_PCM_FORMAT_FLOAT_LE; + case PCM_FORMAT_FLOAT_BE: + return SNDRV_PCM_FORMAT_FLOAT_BE; }; } @@ -556,6 +561,8 @@ unsigned int pcm_format_to_bits(enum pcm_format format) case PCM_FORMAT_S32_BE: case PCM_FORMAT_S24_LE: case PCM_FORMAT_S24_BE: + case PCM_FORMAT_FLOAT_LE: + case PCM_FORMAT_FLOAT_BE: return 32; case PCM_FORMAT_S24_3LE: case PCM_FORMAT_S24_3BE: |