mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(GUI): convert wave audio providers to ISampleProvider.
avoids audio clicking at the end of playback.
This commit is contained in:
parent
a1f3db374e
commit
8d7d06e1ac
@ -987,6 +987,9 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
CurrentAudio = new WaveStreamImpl (sound);
|
CurrentAudio = new WaveStreamImpl (sound);
|
||||||
AudioDevice = new WaveOutEvent();
|
AudioDevice = new WaveOutEvent();
|
||||||
|
if ("wav" == sound.SourceFormat)
|
||||||
|
AudioDevice.Init (CurrentAudio.ToSampleProvider());
|
||||||
|
else
|
||||||
AudioDevice.Init (CurrentAudio);
|
AudioDevice.Init (CurrentAudio);
|
||||||
AudioDevice.PlaybackStopped += OnPlaybackStopped;
|
AudioDevice.PlaybackStopped += OnPlaybackStopped;
|
||||||
AudioDevice.Play();
|
AudioDevice.Play();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user