Skip to content
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

Confused about when to call speaker.Play() #26

Closed
duysqubix opened this issue Oct 10, 2023 · 1 comment
Closed

Confused about when to call speaker.Play() #26

duysqubix opened this issue Oct 10, 2023 · 1 comment
Labels
question Further information is requested

Comments

@duysqubix
Copy link
Contributor

First, thank you for the awesome project!

I have multiple, large music files I want to stream from disk, like this:

  • play song A
  • stop song A, start playing B
  • stop B, continue playing A
  • etc

When a song plays all the way through, I rewind it (via. streamer.Seek(0)).

Given this kind of usage, what I've come up with is to have ctrl := beep.Ctrl{...} where I keep changing ctrl.Streamer to the song I want to play.

However I'm confused about when I need to call speaker.Play(). Do I just call it once, after constructing ctrl? Or every time I change ctrl.Streamer? Or only after I rewind a streamer?

Thanks for any info!

Original issue: faiface/beep#143

@MarkKremer MarkKremer added the question Further information is requested label Oct 10, 2023
@MarkKremer
Copy link
Contributor

Question was answered in original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants