Skip to content

Commit

Permalink
Added support for Balance
Browse files Browse the repository at this point in the history
Added support for Balance while keeping backward compatibillity
  • Loading branch information
Lockzi committed May 30, 2017
1 parent 8067ca0 commit ec7c963
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ obj/

# Ignore Mac DS_Store files
.DS_Store
npm-debug.log
9 changes: 9 additions & 0 deletions lib/actions/equalizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ function speechEnhancement(player, values) {
return player.speechEnhancement(enable);
}

function balance(player, values) {

const balance = parseInt(values[0]);

return player.setBalance(balance);

}

module.exports = function (api) {
api.registerAction('nightmode', nightMode);
api.registerAction('speechenhancement', speechEnhancement);
api.registerAction('balance', balance);
}
3 changes: 2 additions & 1 deletion lib/actions/volume.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict';
function volume(player, values) {
var volume = values[0];
return player.setVolume(volume);
var channel = values[1] || 'Master';
return player.setVolume(volume, channel);
}

function groupVolume(player, values) {
Expand Down

0 comments on commit ec7c963

Please sign in to comment.