Audio
Audio
Audio
It is typically using a level of electrical voltage for analog signals, and a series of binary
numbers for digital signals.
Audio signals have frequencies in the audio frequency range of roughly 20 to 20,000 Hz,
which corresponds to the lower and upper limits of human hearing.
Dealing With Audio in C#
Playing an audio:
using (var outputDevice = new WaveOutEvent())
{
outputDevice.Init(audioFileReader);
outputDevice.Play();
while (outputDevice.PlaybackState == PlaybackState.Playing)
{
System.Threading.Thread.Sleep(1000);
}
}
Find More Information about Audio:
// Load the audio file and set it as the WaveStream for the WaveViewer
WaveFileReader waveFileReader = new WaveFileReader(audioFile1);
waveViewer.WaveStream = waveFileReader;
waveIn.StartRecording();
waveIn.StopRecording();
Example:
using NAudio.Wave.SampleProviders;
Tip:
Use Charting to plot the audio signal OR you can
use OxyPlot
That’s All