Answer the question
In order to leave comments, you need to log in
c# audio playback issues. How to get rid of extraneous sound?
Tried to play mp3 in c# in the following ways:
1) Using WindowsMedia:
Uri p = new Uri(path.ToString());
_mediaPlayer.Open(p);
_mediaPlayer.Play();
2) Using NAudio
WaveStream mainOutputStream = new Mp3FileReader(path.ToString());
WaveChannel32 volumeStream = new WaveChannel32(mainOutputStream);
WaveOutEvent player = new WaveOutEvent();
player.Init(volumeStream);
player.Play();
Both methods work, but the problem is this - when Play is called in both cases, a clattering sound is heard before playback (as if the speakers were plugged into the laptop).
If it matters:
OS Windows 10
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question