-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Attempt at getting an async audio player working #36
Conversation
Looks good to me! Simple but effective :D |
I can't decide if this is the best API surface for the async part. Currently we could use the player as follows: CancellationTokenSource cancellationTokenSource;
public async Task Play()
{
await asyncAudioPlayer.PlayAsync(cancellationTokenSource.Token);
}
public void Stop()
{
cancellationTokenSource.Cancel();
} Is this fine or should we consider providing a Stop method that would call |
Hm yeah I do think I prefer to (also) have a stop method in the player. One doesn't rule out the other, right? You can still use the CancellationToken manually if that's what you want, or you call Stop and we will do it for you. |
@jfversluis I think this is ready for a review now. One thing I wasn't completely sure on was the lack of properties on |
Yeah let's see if people can figure it out or not, or maybe add a little bit of documentation around that? |
Thanks for making this happen ✨ |
Fixes #25