aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-10 21:46:10 +0100
committerMax Kellermann <max@duempel.org>2009-11-10 21:46:10 +0100
commit2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf (patch)
treeaba3aa076075c56d7909ef0e3d2fb9d2471fdce3 /src/decoder/_flac_common.h
parentb6a2ffd3d761c05fd7cd7fecfe470307b6a5ed15 (diff)
downloadmpd-2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf.tar.gz
mpd-2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf.tar.xz
mpd-2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf.zip
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.
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.h6
1 files changed, 4 insertions, 2 deletions
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 <glib.h>
@@ -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;