Commit 2cee9c4f authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

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
parent 12c138f3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
+2 −0
Original line number Diff line number Diff line
@@ -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 ######################### */