-
Notifications
You must be signed in to change notification settings - Fork 9
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
Sync changing of sample rate #8
Comments
It sounds like you want to be able to do something like this? // ... create SRC object with sample rate 44.1k
src.simple(data); // or full
src.outputSampleRate = 48000;
src.simple(data); // or full Is this correct? |
Yes, something like that would be ideal. |
Cool. Seems like the easiest way to do this would be to add a setter to the js src object which just calls destroy() + init() on the WASM module. If you're comfortable doing this, please open a pr! otherwise, I can look into it in the next week or two. |
I've worked around it like so: https://gist.github.com/jscheid/0fe0ca86dbecc7a4efb65a604284d1c1 It's a hack but it does work, feel free to close this. |
Seems like a feature worth having. Will add within the next week or two. |
The other useful improvement would be a way to process multiple streams in parallel (with the full API). This doesn't currently work (efficiently) because there's only a single |
Interesting. Curious to see how you would want this used. For organization, would you open a new issue with a bit more detail? |
Added support for updating input and output sample rates in 1c90c7e |
Thanks! |
Happy to! |
Could the call to
new SRC
somehow be moved out of the promise, so that different sample rates can be chosen without needlessly having to resolve a promise?The text was updated successfully, but these errors were encountered: