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
I'd like to change the pitch of a sound that is being played. To do this, it's as easy as changing the rodio audio sink's speed while it is playing. However, we do not currently have access to the underlying sink in a Source. While Source.set_pitch exists, it only changes the pitch of the subsequent sounds to be played. While this is also an useful feature to have (for e.g. pitching sounds like footsteps randomly), I think we should have the ability to change the pitch of currently playing sounds as well.
We have a couple options here, but I think the most sensible one is to actually have set_pitch affect the current sounds being played as set_volume does, but also accept parameters on all play functions to set the starting properties of the sound (e.g. speed, fadein, skip duration). Right now these properties are stored in the source instead. While this does work I think it'd make sense to go with the aforementioned approach as it is also consistent with how Drawables work. (There's a DrawParam that stores the sprite info which is passed to the draw function, instead of storing it in the canvas.)
The text was updated successfully, but these errors were encountered:
I'd like to change the pitch of a sound that is being played. To do this, it's as easy as changing the rodio audio sink's speed while it is playing. However, we do not currently have access to the underlying sink in a
Source
. WhileSource.set_pitch
exists, it only changes the pitch of the subsequent sounds to be played. While this is also an useful feature to have (for e.g. pitching sounds like footsteps randomly), I think we should have the ability to change the pitch of currently playing sounds as well.We have a couple options here, but I think the most sensible one is to actually have set_pitch affect the current sounds being played as set_volume does, but also accept parameters on all play functions to set the starting properties of the sound (e.g. speed, fadein, skip duration). Right now these properties are stored in the source instead. While this does work I think it'd make sense to go with the aforementioned approach as it is also consistent with how Drawables work. (There's a DrawParam that stores the sprite info which is passed to the draw function, instead of storing it in the canvas.)
The text was updated successfully, but these errors were encountered: