You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’m working on a music player using rodio and would like to implement a real-time audio visualizer, akin to what is seen in WinAmp. To achieve this, I need access to the audio data being played.
Is there a way to access the audio samples rodio sends to the output device?
If not, what’s the easiest approach to achieve this while still using rodio for playback?
Thanks.
The text was updated successfully, but these errors were encountered:
Yes but you might need to do a little more work then usual since you can not use Sink. Instead you want to use rodio's audio pipeline directly and add a custom component for visualization.
Here are some helpful examples for using rodio's pipeline directly:
In addition to that you will use inner_mut() within the periodic_callback() closure to get to to different components in the pipeline. See this part of the Sink source as an example for that.
Regarding the audio visualization, you probably need to do something with every sample for that. You need to add a custom Source for that. It will wrap any other source (see amplify as example). In the iterator implementation for the source you can the freely do something with the samples as long as its fast. You might want to send the samples over to another thread and make the visualization there.
Hi, I’m working on a music player using rodio and would like to implement a real-time audio visualizer, akin to what is seen in WinAmp. To achieve this, I need access to the audio data being played.
Is there a way to access the audio samples rodio sends to the output device?
If not, what’s the easiest approach to achieve this while still using rodio for playback?
Thanks.
The text was updated successfully, but these errors were encountered: