fix: alter volume of stream, not device

This commit is contained in:
Anna 2020-08-25 14:06:18 -04:00
parent 7909ea722e
commit 1ed1bde02b
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0

View File

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