From 96155a3376ef40eac9ca7a7b882da6447ab53979 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Oct 2008 14:41:37 +0200 Subject: audio_format: added audio_format_frame_size() A frame contains one sample per channel, thus it is sample_size * channels. This patch includes some cleanup for various locations where the sample size for 24 bit audio was still 3 bytes (instead of 4). --- src/audioOutputs/audioOutput_alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audioOutputs/audioOutput_alsa.c') diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index 30ad449f3..9d47ff244 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -288,7 +288,7 @@ configure_hw: if (err < 0) goto error; - ad->sampleSize = audio_format_sample_size(audioFormat) * audioFormat->channels; + ad->sampleSize = audio_format_frame_size(audioFormat); DEBUG("ALSA device \"%s\" will be playing %i bit, %u channel audio at " "%u Hz\n", ad->device, audioFormat->bits, -- cgit v1.2.3