diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-26 12:18:53 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-26 12:19:06 +0200 |
commit | 75ed0d2f512a625961a90ede09bb284711fc3496 (patch) | |
tree | e1afcde331c253cd4a4a60574e0d2791dd43006c /plugins | |
parent | 98d9c0b4046efcb9cabb40a8a5e66f0cf84e7432 (diff) |
fixed flac gapless streaming
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/flac/flac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c index a241052e..7a909792 100644 --- a/plugins/flac/flac.c +++ b/plugins/flac/flac.c @@ -24,8 +24,8 @@ static DB_decoder_t plugin; static DB_functions_t *deadbeef; -#define trace(...) { fprintf(stderr, __VA_ARGS__); } -//#define trace(fmt,...) +//#define trace(...) { fprintf(stderr, __VA_ARGS__); } +#define trace(fmt,...) #define min(x,y) ((x)<(y)?(x):(y)) #define max(x,y) ((x)>(y)?(x):(y)) @@ -170,7 +170,7 @@ cflac_init (DB_playItem_t *it) { startsample = 0; endsample = cb.totalsamples-1; currentsample = 0; - trace ("startsample=%d, endsample=%d\n", startsample, endsample); + trace ("startsample=%d, endsample=%d, totalsamples=%d\n", startsample, endsample, cb.totalsamples); } plugin.info.readpos = 0; @@ -188,7 +188,6 @@ cflac_free (void) { static int cflac_read_int16 (char *bytes, int size) { - int initsize = size; if (size / (2 * plugin.info.channels) + currentsample > endsample) { size = (endsample - currentsample + 1) * 2 * plugin.info.channels; trace ("size truncated to %d bytes, cursample=%d, endsample=%d\n", size, currentsample, endsample); @@ -196,6 +195,7 @@ cflac_read_int16 (char *bytes, int size) { return 0; } } + int initsize = size; do { if (remaining) { int s = size * 2; |