From c412d6251e9cd3abe735b7622af4003502e54f72 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 17:11:34 +0100 Subject: audio_format: changed "bits" to "enum sample_format" This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value. --- src/pcm_volume.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pcm_volume.c') diff --git a/src/pcm_volume.c b/src/pcm_volume.c index 90ad17d6d..acb6c41a8 100644 --- a/src/pcm_volume.c +++ b/src/pcm_volume.c @@ -150,17 +150,17 @@ pcm_volume(void *buffer, int length, return true; } - switch (format->bits) { - case 8: + switch (format->format) { + case SAMPLE_FORMAT_S8: pcm_volume_change_8((int8_t *)buffer, length, volume); return true; - case 16: + case SAMPLE_FORMAT_S16: pcm_volume_change_16((int16_t *)buffer, length / 2, volume); return true; - case 24: + case SAMPLE_FORMAT_S24_P32: pcm_volume_change_24((int32_t*)buffer, length / 4, volume); return true; -- cgit v1.2.3