From 2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 21:46:10 +0100 Subject: decoder/flac: use pcm_buffer instead of fixed buffer This is a great simplification for flac_common_write(), because we can convert and submit all of the buffer in one turn. No more partial buffers with complicated formulas. --- src/decoder/_flac_common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/decoder/_flac_common.h') diff --git a/src/decoder/_flac_common.h b/src/decoder/_flac_common.h index 0169e3027..0172ed2b1 100644 --- a/src/decoder/_flac_common.h +++ b/src/decoder/_flac_common.h @@ -24,7 +24,8 @@ #ifndef MPD_FLAC_COMMON_H #define MPD_FLAC_COMMON_H -#include "../decoder_api.h" +#include "decoder_api.h" +#include "pcm_buffer.h" #include "config.h" #include @@ -145,7 +146,8 @@ typedef size_t flac_read_status_size_t; #define FLAC_CHUNK_SIZE 4080 struct flac_data { - unsigned char chunk[FLAC_CHUNK_SIZE]; + struct pcm_buffer buffer; + float time; unsigned int bit_rate; struct audio_format audio_format; -- cgit v1.2.3