rodio icon indicating copy to clipboard operation
rodio copied to clipboard

Add comment describing how speed.rs achieves its speedup

Open yara-blue opened this issue 1 year ago • 5 comments

Add comment describing how speed.rs achieves its speedup

  • might not be obvious to a reader it relies on the samplerateconverter to do its thing.
  • it should document it will raise the frequency
  • current doc comment is plain wrong

yara-blue avatar Mar 31 '24 18:03 yara-blue

Hello @dvdsk I noticed you already assigned yourself this task. I am interested in contributing on it as my first contribution so I dont know if you are done with it or if I can consider working on it .

ugochukwu-850 avatar Sep 29 '24 17:09 ugochukwu-850

Its a small chore I planned for myself, but I have not done it yet :)

Might be a good first issue it requires some familiarity with the rodio code base, some knowledge of audio processing and finally the patience to write good documentation. Its all yours, have fun and thanks for the help :+1:

yara-blue avatar Sep 29 '24 21:09 yara-blue

@dvdsk I am have figured out how it works and I have quite a documentation , but I have a small problem , where should i make this documentation.

I am considering making a module documentation of the Speed.rs module , explaining how the Speed struct actually effects the Source trait and how it alter sound speed ; and also making a function doc - showing an example noting the change in pitch - over the set_speed() function . Should I go ahead with this approach , I was considering it , because , it would help future contributors and also end users of the crate as most may never see the docs over speed.rs itself , and some might not intuitively know that altering the speed would affect pitch .

Once you clear me on this , I would commit my changes and make a pull . Thank you .

ugochukwu-850 avatar Oct 04 '24 15:10 ugochukwu-850

Good question, until a few days ago we hadn't figured it out yet. We are adding a contributors guide now. We decided that for effects (like speedup) the best place for the documentation is in src/source/mod.rs at the trait method that applies the effect. So Source::speedup.

and also making a function doc - showing an example noting the change in pitch - over the set_speed() function

Very nice! you could maybe add the example as part of the docs on the Source::speedup method. Depends on how big it gets of course.

yara-blue avatar Oct 05 '24 00:10 yara-blue

@dvdsk I have made the PR for this issue . Please do well to check it out and merge #630 . I would go ahead and make the PR for the other Issue I created yesterday

ugochukwu-850 avatar Oct 05 '24 09:10 ugochukwu-850