tonarino / actor

A minimalist actor framework aiming for high performance and simplicity.
MIT License
40 stars 6 forks source link

Provide "audio echo effect" example #28

Closed strohel closed 3 years ago

strohel commented 3 years ago

This is somewhat overlapping with the media_pipeline example, but it actually works, and was fun to write and test. :) I wanted to get some hands-on experience, and also try circular actor dependencies.

Provided you have PulseAudio installed, run it as:

parec --latency=2940 | ./target/debug/examples/echo | pacat --latency=2940

BEWARE, running is prone to create loud audio feedback. Headphones ease that.

The simple_logger already used in media_pipeline unconditionally writes to stdout, which garbles audio output, so I switched to env_logger.

Potential shortcomings/follow-ups:

Fixes #4.

strohel commented 3 years ago

Thanks for your reviews! I've tried to address all remarks (ones I mark :tada: should be resolved in code). I've force-pushed to resolve merge conflict, but the first 2 commits stayed the same.

The rustfmt CI currently fails on benches that @mcginty pushed directly to main. ;-)

mcginty commented 3 years ago

Thanks for your reviews! I've tried to address all remarks (ones I mark should be resolved in code). I've force-pushed to resolve merge conflict, but the first 2 commits stayed the same.

The rustfmt CI currently fails on benches that @mcginty pushed directly to main. ;-)

oooooooooooooooooooooooooooops. fixed.

skywhale commented 3 years ago

Thank you @strohel for the detailed responses. I could only come up with nitty picky comments, but your response to them made it a valuable learning experience for me :)

skywhale commented 3 years ago

@strohel Please feel free to merge PRs by yourself after receiving an approval :) You don't have to wait for us.