rodio icon indicating copy to clipboard operation
rodio copied to clipboard

Is a scheduled-playback-feature and retrieving playback position planned?

Open kerskuchen opened this issue 7 years ago • 6 comments

It would be very useful (i.e. for rhythm games and effects like mickey-mousing) to play sounds starting at a certain sample-index and also to retrieve the index of the last sample that was committed to cpal.

An example of an API that does this would be Unity3D's AudioSource.PlaySheduled function and its AudioSettings.dspTime

Combining those two APIs make the gameplay in the following 1 minute video possible.

Building this from scratch over cpal would be possible but tedious and would duplicate the existing functionality of rodio in every case except for the above API additions. So I thought I just ask if are any plans to do this already :)

kerskuchen avatar Oct 15 '18 18:10 kerskuchen

I really needed a way to retrieve the playback position (working on a rhythm game), so I tried my hand at implementing it as a filter: https://github.com/PaddyCo/rodio/tree/elapsed

I'm gonna test it out more thoroughly before I submit a pull request, but it should be accurate enough for most use-cases

PaddyCo avatar Jan 30 '19 21:01 PaddyCo

@PaddyCo Any plans to do a PR for this? I think this would be a great addition that could benefit those who are requesting for the feature!

yong-jie avatar Jun 07 '19 14:06 yong-jie

@PaddyCo +1 for a PR for the elapsed feature. I used your branch in a private project and it worked great. Would love to see this make it into master.

nickmonad avatar Feb 24 '20 14:02 nickmonad

Oh sorry I totally forgot about this, I'm gonna try and find some time this weekend and do some clean-up if necessary and then I'll open a PR 😅

PaddyCo avatar Feb 25 '20 19:02 PaddyCo

Hi, I really want want the "playback position" feature for my project and waiting for the pull request to be merged. By the way, are there any info about scheduled playback yet?

TonalidadeHidrica avatar Aug 30 '20 21:08 TonalidadeHidrica

Has there been any movement on this, or has this request been discarded?

temportalflux avatar Oct 08 '22 17:10 temportalflux