(GUI): convert wave audio providers to ISampleProvider.

avoids audio clicking at the end of playback.
This commit is contained in:
morkt 2017-11-21 12:13:42 +04:00
parent a1f3db374e
commit 8d7d06e1ac

View File

@ -987,6 +987,9 @@ namespace GARbro.GUI
}
CurrentAudio = new WaveStreamImpl (sound);
AudioDevice = new WaveOutEvent();
if ("wav" == sound.SourceFormat)
AudioDevice.Init (CurrentAudio.ToSampleProvider());
else
AudioDevice.Init (CurrentAudio);
AudioDevice.PlaybackStopped += OnPlaybackStopped;
AudioDevice.Play();