通过AppleScript更改音量API在Spotify中向下舍入

时间:2013-02-19 23:02:10

标签: applescript spotify

重现的步骤

主叫:

tell application "Spotify"
if it is running then
    set sound volume to (sound volume * .10)
end if
end tell

然后:

tell application "Spotify"
if it is running then
    set sound volume to (sound volume * 10)
end if
end tell

观察到的行为

反复调用会降低应用的音量。

预期行为

应该回到原始音量(如rdio和iTunes那样)

1 个答案:

答案 0 :(得分:0)

只要音量不减少到0,

set sound volume to (sound volume * 10)

会再次增加音量。一旦达到0,0x10 = 0