From c81768d4d437604eafd3cb164dbb71715148d199 Mon Sep 17 00:00:00 2001 From: JanOonk Date: Tue, 12 Nov 2019 23:24:14 +0100 Subject: [PATCH] Update WaveProviders.md --- Docs/WaveProviders.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/WaveProviders.md b/Docs/WaveProviders.md index 807a4c81..64ef9f9c 100644 --- a/Docs/WaveProviders.md +++ b/Docs/WaveProviders.md @@ -36,7 +36,7 @@ public interface IWaveProvider } ``` -The `IWavePlayer` interface only needs an `IWaveProvider` passed to its `Init` method in order to be able to play audio. `WaveFileWriter.CreateWaveFile` and `MediaFoundationEncoder.EncodeToMp3` also only needs an `IWaveProvider` to dump the audio out to a WAV file. So in many cases you won't need to create a `WaveStream` implementation, just implement `IWavePlayer` and you've got an audio source that can be played or rendered to a file. +The `IWavePlayer` interface only needs an `IWaveProvider` passed to its `Init` method in order to be able to play audio. `WaveFileWriter.CreateWaveFile` and `MediaFoundationEncoder.EncodeToMp3` also only needs an `IWaveProvider` to dump the audio out to a WAV file. So in many cases you won't need to create a `WaveStream` implementation, just implement `IWaveProvider` and you've got an audio source that can be played or rendered to a file. `BufferedWaveProvider` is a good example of a `IWaveProvider` as it has no ability to reposition - it simply returns any buffered audio from its `Read` method. @@ -77,4 +77,4 @@ public int Read(float[] buffer, int offset, int sampleCount) NAudio makes it easy to go from an `IWaveProvider` to an `ISampleProvider` with the `ToSampleProvider` extension method. You can also use `AudioFileReader` which reads a wide variety of file types and implements `ISampleProvider`. -You can get back to an `IWaveProvider` with the `ToWaveProvider` extension method. Or there's the `ToWaveProvider16` extension method if you want to go back to 16 bit integer samples. \ No newline at end of file +You can get back to an `IWaveProvider` with the `ToWaveProvider` extension method. Or there's the `ToWaveProvider16` extension method if you want to go back to 16 bit integer samples.