Audio question

Hey all,
Would there be a way to check if audio is muted or unmuted without using a story variable? When the player goes to the settings page, I want the audio enabled checkbox to be checked if enabled, and unchecked if disabled. Currently it will always appear unchecked.

<div class = "settings3">\
Audio enabled:   <label><<checkbox "_enabled" false true>></label>
</div>\

<<button "Save and Exit">>\
<<if _enabled>>\
<<masteraudio unmute>>
<<else>>\
<<masteraudio mute>>
<</if>>\
<<goto "testpassage">>
<</button>>\

Twine Version: 2.6.1

I think you might find the Audio APIs to be helpful here, especially this one:
http://www.motoslave.net/sugarcube/2/docs/#simpleaudio-api-method-mute

3 Likes

Perfect. Thanks for the quick response.

1 Like