From 37754559b8f934ce8d554e0d9f976d4f6eb376d9 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 19 Jul 2009 16:24:43 +0100 Subject: Add audio_format_init() function It makes no difference right now, but we're about to add an endianness flag and will want to make sure it's correctly initialised every time. --- src/decoder/_flac_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/decoder/_flac_common.c') diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index 713dfe9b2..7b3453854 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -195,9 +195,8 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block, switch (block->type) { case FLAC__METADATA_TYPE_STREAMINFO: - data->audio_format.bits = (int8_t)si->bits_per_sample; - data->audio_format.sample_rate = si->sample_rate; - data->audio_format.channels = (int8_t)si->channels; + audio_format_init(&data->audio_format, si->sample_rate, + si->bits_per_sample, si->channels); data->total_time = ((float)si->total_samples) / (si->sample_rate); break; case FLAC__METADATA_TYPE_VORBIS_COMMENT: -- cgit v1.2.3