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

[QUESTION] How to setup a Reverberation in Unity #489

Open
zenhund74 opened this issue Jul 8, 2024 · 1 comment
Open

[QUESTION] How to setup a Reverberation in Unity #489

zenhund74 opened this issue Jul 8, 2024 · 1 comment

Comments

@zenhund74
Copy link

Hi, I'm trying to find a good reverb for streaming audio in unity with OnAudioFilterRead. I managed to get Freeverb working in an older Version approximately like this:

` fluid_revmodel Reverb = new fluid_revmodel(48000, 256);

 void OnAudioFilterRead(float[] data, int numChannels)
{
   int monoLength = data.Length / numChannels;
   float[] monobuffer = new float[monoLength];
   float[] left_out = new float[monoLength];
    float[] right_out = new float[monoLength]; 
  
  //Convert Stereo to mono if necessary

    
    Reverb.fluid_revmodel_processmix(monobuffer, left_out, right_out);

         int j = 0;
        for (int i = 0; i < data.Length - 1; i += 2)
        {
            data[i] = left_out[j];
            data[i + 1] = right_out[j];
            j++;
        }

}
`
Can you explain to me on how to do that with the CSCore effects?

@zenhund74
Copy link
Author

I understand now why I found reverb related cs files with only parameters in them. So waves reverb is a part of DirectX.Audio
Thank you, still!

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

1 participant