mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +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,7 +987,10 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
CurrentAudio = new WaveStreamImpl (sound);
|
CurrentAudio = new WaveStreamImpl (sound);
|
||||||
AudioDevice = new WaveOutEvent();
|
AudioDevice = new WaveOutEvent();
|
||||||
AudioDevice.Init (CurrentAudio);
|
if ("wav" == sound.SourceFormat)
|
||||||
|
AudioDevice.Init (CurrentAudio.ToSampleProvider());
|
||||||
|
else
|
||||||
|
AudioDevice.Init (CurrentAudio);
|
||||||
AudioDevice.PlaybackStopped += OnPlaybackStopped;
|
AudioDevice.PlaybackStopped += OnPlaybackStopped;
|
||||||
AudioDevice.Play();
|
AudioDevice.Play();
|
||||||
input = null;
|
input = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user