Skip to content

Callback or Signal for Playback complete  #230

Open
@JackMordaunt

Description

Instead of polling the player, perhaps it would be better to offer either a callback or a channel style API.

    // We can wait for the sound to finish playing using something like this
    for player.IsPlaying() {
        time.Sleep(time.Millisecond)
    }
// Channel style.
<-player.Done()

// Callback style.
player.OnDone(func() {...})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions