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

Delay not doing anything on my build from master vs Rack master #32

Closed
ghost opened this issue Jan 14, 2018 · 2 comments
Closed

Delay not doing anything on my build from master vs Rack master #32

ghost opened this issue Jan 14, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 14, 2018

Hi,

I recently built Rack and Fundamental from their current master branches, and afterwards I noticed I didn't seem to get any delay output from the delay module, just dry.

I'm curious about whether this is just some error of mine while building, or if it's an actual code problem.

After a bit of experimentation, I found that the following diff at least restored some wet output, but the code is largely mysterious to me, so no claims as to the correctness of it!

diff --git a/src/Delay.cpp b/src/Delay.cpp
index a89c7d6..0978168 100644
--- a/src/Delay.cpp
+++ b/src/Delay.cpp
@@ -75,7 +75,7 @@ void Delay::step() {
                int inFrames = mini(historyBuffer.size(), 16);
                int outFrames = outBuffer.capacity();
                // printf(">\t%d\t%d\n", inFrames, outFrames);
-               src.setRates(ratio * engineGetSampleRate(), engineGetSampleRate());
+               src.setRates(engineGetSampleRate()/ratio, engineGetSampleRate());
                src.process((const Frame<1>*)historyBuffer.startData(), &inFrames, (Frame<1>*)outBuffer.endData(), &outFrames);
                historyBuffer.startIncr(inFrames);
                outBuffer.endIncr(outFrames);
@AndrewBelt
Copy link
Member

AndrewBelt commented Jan 14, 2018

libspeexdsp is not designed for smoothly varying ratios, so in order to restore functionality of Delay, libsamplerate will need to be used within the Fundamental project.

@ghost
Copy link
Author

ghost commented Jan 14, 2018

Thanks, it does sound a bit rough.. :) I'll close this.

@ghost ghost closed this as completed Jan 14, 2018
This issue was closed.
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