Get, Set and Watch Master Audio Volume
npm i --save win-audio
node-gyp to build src/audio.cc
var audio = require('win-audio')
audio.polling(200)
audio.on('change', (volume) => {
console.log("old %d%% -> new %d%%", volume.old, volume.new)
})
audio.set(75)
audio.increase(25)
audio.mute()
audio.decrease(10)
Number
interval: milliseconds for check volume changes. (Default 500)
Return current percentage of volume.
Set a new master volume.
Number
value: percentage of new volume. [0-100]
Increase current volume of value %.
Number
value: percentage. [0-100]
Decrease current volume of value %.
Number
value: percentage. [0-100]
Mute volume.
Unmute volume.
Mute/Unmute volume according to current status.
Called when volume is changed.
Francesco Cannizzaro