From 2cee9c4f22d697ce94bfb4dd7d07e1d9d302ba5f Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 27 May 2026 10:10:11 +0200 Subject: [PATCH] Allow to disable JBM tracefile writing via a define That way JBM tracefile writing can be disabled with a compiler option (-DNO_SUPPORT_JBM_TRACEFILE) without having to modify the source code + fix missing parameter in IVAS_DEC_VoIP_GetSamples() with SUPPORT_JBM_TRACEFILE undefined --- apps/decoder.c | 2 +- lib_com/options.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index 2588e8d3c..0073ad935 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -3195,7 +3195,7 @@ static ivas_error decodeVoIP( #ifdef SUPPORT_JBM_TRACEFILE if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); diff --git a/lib_com/options.h b/lib_com/options.h index c9aba1426..8242a0b71 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -40,7 +40,9 @@ /* clang-format off */ /* ################### Start compiler switches ######################## */ +#ifndef NO_SUPPORT_JBM_TRACEFILE #define SUPPORT_JBM_TRACEFILE /* support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */ +#endif /* #################### End compiler switches ######################### */ -- GitLab