Soft clipping. Hard clipping.

Started by zahar,

zahar

The clipping issue needs to be closed forever. As I understand it, clipping occurs because the signal is too loud. The question is: if each player has a fixed volume of 1.0, will there be clipping? Well, I also made a compressor like this:

HFX fxComp = BASS_ChannelSetFX(stream, BASS_FX_BFX_COMPRESSOR2, 0);
if (fxComp)
{
    BASS_BFX_COMPRESSOR2 compParams{};

    compParams.fThreshold = -18.0f;
    compParams.fRatio = 3.0f;   
    compParams.fAttack = 0.005f; 
    compParams.fRelease = 0.1f;
    compParams.fGain = 3.0f;   
    compParams.lChannel = BASS_BFX_CHANALL;

    BASS_FXSetParameters(fxComp, &compParams);
}

Ian @ un4seen

If you have multiple streams playing at full volume then there is quite likely to be some clipping, but not always. Note the level of a stream's data also matters, not only its volume setting (BASS_ATTRIB_VOL), eg. if the data contains silence then it'll still be silent at max volume. You can get the data level from BASS_ChannelGetLevel(Ex).