Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volume doesn't use my algorithm - brendan #91

Open
wtfloltk opened this issue Dec 24, 2023 · 1 comment
Open

volume doesn't use my algorithm - brendan #91

wtfloltk opened this issue Dec 24, 2023 · 1 comment

Comments

@wtfloltk
Copy link

double GetBass() {
    double t = config::get_bass();
    double t2;
    for (int i = 0; i < 24; i++)
        for (int j = 0; j <24; j++)
        {
            t2 = t;
            t = g_drv.in_mixes[0].mix[i][j];
            g_drv.in_mixes[0].mix[i][j] = t * t2;
            t = VOLUME_MAX*((config::get_bass()*10)*(((i+config::get_bass())*config::get_bass()) - (config::get_bass()*(j+config::get_bass())))/10)/15;
            g_drv.in_mixes[0].mix[i][j] = t * g_drv.in_mixes[0].mix[i][j];
        }
    return config::get_bass();
}

void SetBass(double bass) {
    //volume = std::clamp(volume, (double)0.0, VOLUME_MAX);
    double t;
    double t2;
    for (int i = 0; i < 24; i++)
        for (int j = 0; j <24; j++)
        {
            t2 = t;
            t = g_drv.in_mixes[0].mix[i][j];
            g_drv.in_mixes[0].mix[i][j] = t * t2;
            t = VOLUME_MAX*((bass*10)*(((i+bass)*bass) - (bass*(j+bass)))/10)/15;
            g_drv.in_mixes[0].mix[i][j] = t * g_drv.in_mixes[0].mix[i][j];
        }

    g_tune_bass = bass;
    config::set_bass(bass);
}
@proconsule
Copy link
Owner

Can you explain issue better, sorry i cant understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants