faiface / beep

A little package that brings sound to any Go application. Suitable for playback and audio-processing.
MIT License
2.08k stars 151 forks source link

Code advice: Implement forward and backward #156

Open pmoscode opened 2 years ago

pmoscode commented 2 years ago

Hi folks, I have a list of streams wrapped by beep.Seq(). These are all played sequential one by one. How do I get it managed to jump forward and backward in the streams.

Let's assume this: Seq: Stream 1 -> Stream 2 -> Stream 3 -> Stream 4

When the player is started and is in stream 2 after a while, I want to jump to stream 3. From there I want to jump back to stream 1.

How do I achieve that? I know, I could rebuild the sequence (beep.Seq()), but is there another way? Or isn't it possible, because I missed something...

Thx

MarkKremer commented 1 year ago

I don't think this is possible currently. You would either have to rebuild the sequence or add the sequence to a buffer, which implements StreamSeeker.

This is a feature I would like to see supported in the future. Question is how the implementation would work...