Commit c1d575f1 authored by Jan Kiene's avatar Jan Kiene
Browse files

actually use value read from scale file

parent 719d11f2
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2587,11 +2587,11 @@ static ivas_error decodeG192(
                    int16_t maxScaling;
                    /* max scaling as abs diff to the normal frame size in samples */
#ifdef NONBE_FIX_1105_TSM_IN_SILENCE
                    maxScaling = arg.tsmScale >= 100 ? nOutSamples * vec_pos_len : 0; /* always allow the maximum possible scaling */
                    maxScaling = scale >= 100 ? nOutSamples * vec_pos_len : 0; /* always allow the maximum possible scaling */
#else
                    maxScaling = (int16_t) ceilf( (float) abs( arg.tsmScale - 100 ) / 100.0f * (float) ( nOutSamples * vec_pos_len ) );
                    maxScaling = (int16_t) ceilf( (float) abs( scale - 100 ) / 100.0f * (float) ( nOutSamples * vec_pos_len ) );
#endif
                    if ( ( error = IVAS_DEC_VoIP_SetScale( hIvasDec, maxScaling, arg.tsmScale ) ) != IVAS_ERR_OK )
                    if ( ( error = IVAS_DEC_VoIP_SetScale( hIvasDec, maxScaling, scale ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nIVAS_DEC_VoIP_SetScale failed: %s \n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;