Skip to content

Callback or Signal for Playback complete  #230

@JackMordaunt

Description

@JackMordaunt

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() {...})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions