From 771fd96ba70035233ec0b27eb4febb3a659cf886 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 20 Oct 2017 01:12:17 +0200 Subject: [PATCH] "number_type - The numbering scheme used for the frame. As a convenience, the decoder will always convert a frame number to a sample number because the rules are complex." --- SilentPatchSA/FLACDecoderSA.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SilentPatchSA/FLACDecoderSA.cpp b/SilentPatchSA/FLACDecoderSA.cpp index c279961..999e31c 100644 --- a/SilentPatchSA/FLACDecoderSA.cpp +++ b/SilentPatchSA/FLACDecoderSA.cpp @@ -37,7 +37,8 @@ FLAC__StreamDecoderWriteStatus CAEFLACDecoder::write_cb(const FLAC__StreamDecode size_t processedChannels; // Obtain current sample - pClientData->m_currentSample = frame->header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER ? frame->header.number.sample_number : frame->header.number.frame_number; + assert( frame->header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER ); + pClientData->m_currentSample = frame->header.number.sample_number; processedChannels = std::min(2, frame->header.channels); pClientData->m_curBlockSize = frame->header.blocksize; pClientData->m_bufferCursor = 0;