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
Updated dependencies, new audio resampling library, performance improvements and volume control #10
Conversation
Changed EmittedSink::read implementation to non blocking. Increased EmittedSink internal buffer size to fit at least one resampling frame.
Caused problems while pausing.
…ts and setting songbird::Track volume.
Changed datatype in internal sync_channel to fit the floats of both channels. This reduces the amount of synchronisations needed between EmittedSink::read and EmittedSink::write.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this approach makes much more sense than what I was doing. Downsides of learning a language by writing something in it. 😛
Looks like CPU usage while streaming dropped from 10-12% to 5-6% which is excellent as well. 👍
Heyho @codetheweb,
Should i squash the commits in some ways? Regarding the CPU usage: Using the release build I have permanently less than 0.3% on my machine. Maybe we can investigate and optimize the cpu usage further in the future. |
Looks good! Happy New Year to you too. I'll squash when merging.
I should have clarified that my usage stats were assuming full utilization of one core is 100%. If you're measuring based on overall utilization of the CPU, that would explain the difference. I'm on a M1 Max. I'm happy with performance as-is, but if you think it can further be optimized go for it. :) |
Released in v0.3.0. |
Heyho @codetheweb,
as promised some days ago in issue #9, here are my changes open to be discussed:
Updated dependencies:
Switched the library for audio resampling from samplerate to rubato:
Samplerate is based on a c library and the function call used is not recommended for streamed audio because it does not work over chunk boundaries. As written in the docs:
Therefore, this switch should make aoede more portable and additionally improve the audio quality.
Performance improvements:
Implemented volume control using librespot::SoftMixer. Should close Volume Control not working #9.
I'm looking forward to hear from you.
Best regards!