From 4b621a455f27f8d93c76e58760fcef67754ac161 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 15 Jul 2018 01:15:08 +0200 Subject: [PATCH] Fix missing end samples in foobar --- fb2k/foo_vgmstream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fb2k/foo_vgmstream.cpp b/fb2k/foo_vgmstream.cpp index 8c847290..ba3aa8d7 100644 --- a/fb2k/foo_vgmstream.cpp +++ b/fb2k/foo_vgmstream.cpp @@ -209,7 +209,7 @@ bool input_vgmstream::decode_run(audio_chunk & p_chunk,abort_callback & p_abort) if (samples_to_do /*< DECODE_SIZE*/ == 0) { decoding = false; - return false; + return false; /* EOF, didn't decode samples in this call */ } @@ -268,7 +268,7 @@ bool input_vgmstream::decode_run(audio_chunk & p_chunk,abort_callback & p_abort) decode_pos_samples+=samples_to_do; decode_pos_ms=decode_pos_samples*1000LL/vgmstream->sample_rate; - return samples_to_do==max_buffer_samples; + return true; /* decoded in this call (sample_buffer or less) */ } }