From 545685bc3209d9cfdf6c4b9aeee4715edd453dc1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 8 Oct 2011 10:25:06 +0200 Subject: audio_format: basic support for floating point samples Support for conversion from float to 16, 24 and 32 bit integer samples. --- src/pcm_mix.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/pcm_mix.c') diff --git a/src/pcm_mix.c b/src/pcm_mix.c index ef81f44a4..b94089cfb 100644 --- a/src/pcm_mix.c +++ b/src/pcm_mix.c @@ -128,6 +128,10 @@ pcm_add_vol(void *buffer1, const void *buffer2, size_t size, pcm_add_vol_32((int32_t *)buffer1, (const int32_t *)buffer2, size / 4, vol1, vol2); return true; + + case SAMPLE_FORMAT_FLOAT: + /* XXX */ + return false; } /* unreachable */ @@ -216,6 +220,10 @@ pcm_add(void *buffer1, const void *buffer2, size_t size, case SAMPLE_FORMAT_S32: pcm_add_32((int32_t *)buffer1, (const int32_t *)buffer2, size / 4); return true; + + case SAMPLE_FORMAT_FLOAT: + /* XXX */ + return false; } /* unreachable */ -- cgit v1.2.3