From 5cc6d6274d0e2d5fa6b64614dd24e83568a4f985 Mon Sep 17 00:00:00 2001 From: voytas Date: Thu, 30 May 2024 17:59:03 +0100 Subject: [PATCH] add comments --- src/Beeper/AudioPlayer.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Beeper/AudioPlayer.cs b/src/Beeper/AudioPlayer.cs index 981cf10..e1ac0e1 100644 --- a/src/Beeper/AudioPlayer.cs +++ b/src/Beeper/AudioPlayer.cs @@ -46,9 +46,19 @@ public void Stop() _audioPlayer.Stop(); } + /// + /// Plays the audio data. + /// + /// The audio data to play. This is an enumerable collection of bytes. + /// The token to monitor for cancellation requests. public Task Play(IEnumerable data, CancellationToken cancellationToken = default) => Play(new ByteStream(data), cancellationToken); + /// + /// Plays the audio data from a stream. + /// + /// The stream containing audio data to play. This is a Stream object. + /// The token to monitor for cancellation requests. public async Task Play(Stream stream, CancellationToken cancellationToken = default) { using var pcmDataReader = new PcmDataReader(stream, _audioFormat);