Werking nader bestudeerd, enkele dingen ligt aangepast.

This commit is contained in:
Bram Veenboer
2011-02-13 15:51:12 +00:00
parent 3805baf986
commit 7fe13d454b
9 changed files with 84 additions and 52 deletions

View File

@@ -52,13 +52,7 @@ public class WinampApplication extends Application {
WinampController.rew5Secs();
break;
case MUTE:
if(muted) {
WinampController.setVolume(volume);
} else {
volume = WinampController.getVolume();
WinampController.setVolume(0);
}
muted = !muted;
toggleMute();
break;
case VOLUME_UP:
WinampController.increaseVolume();
@@ -67,7 +61,16 @@ public class WinampApplication extends Application {
WinampController.decreaseVolume();
break;
}
} catch (InvalidHandle e) {
} catch (InvalidHandle e) {}
}
protected void toggleMute() throws InvalidHandle {
if (!muted) {
volume = WinampController.getVolume();
}
try {
WinampController.setVolume(muted ? volume : 0);
} catch (InvalidParameter e) {}
muted = !muted;
}
}