should only effect the minimum available. I would like to have tis solution

int iMinAvailable = 0;
if (iActivePercentage) {
    // if minimum is not disabled, have a min of one at least
    iMinAvailable = qMax((iTotalTracks * iActivePercentage / 100), 1);
}
int iActiveTracks = qMax(iUnplayedTracks, iMinAvailable