fix: alter volume of stream, not device
This commit is contained in:
parent
7909ea722e
commit
1ed1bde02b
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user