fix: alter volume of stream, not device

This commit is contained in:
Anna 2020-08-25 14:06:18 -04:00
parent 90e4ea7295
commit 7d2a6a977a
1 changed files with 5 additions and 2 deletions

View File

@ -210,10 +210,13 @@ namespace PeepingTom {
return;
}
WaveChannel32 channel = new WaveChannel32(reader) {
Volume = this.plugin.Config.SoundVolume,
};
using (reader) {
using (var output = new WaveOutEvent() { DeviceNumber = soundDevice }) {
output.Init(reader);
output.Volume = this.plugin.Config.SoundVolume;
output.Init(channel);
output.Play();
while (output.PlaybackState == PlaybackState.Playing) {