Inform 7 Sound Accessibility Text

The Inform 7 documentation says that alt-text can be provided for sounds, with the example Fugue is the file “Bach.ogg” (“A church organ playing a Bach fugue.”).

When I provide alt-text in exactly the same manner, the game simply shows “[Sound effect number 15 here.]” regardless of what text I specify, which looks awful. Is there something I’m missing here? The example given seems very very straightforward so I can’t work out where I could possibly be going wrong.

The exact line I’m including in my own game is:
Sound of Ba-Ding is the file “Ba-Ding.ogg” (“Ba-Ding!”).
Ba-Ding.ogg is the 15th resource in the index so the game is definitely identifying the right sound. I realise the alt-text example doesn’t include “Sound of…” at the beginning of the line but that’s consistent with the preceding page on declaring sounds and the game won’t compile without it.

Just a quick check: does this only happen when you’re playing in the IDE, or does it also happen if you compile a release build? Also, what interpreters have you tried using to run a release build, and what operating system is this?

I ask because the IDE 'terps occasionally seem to display alternate, not-quite-standard behavior for lesser-used features. If this turns out to be the case for you – that it’s just that the 'terp used in the IDE, and that the standard 'terps display the expected behavior, then it might be less of an issue: the only person dealing with it would be you, in development.

Thanks for the help - that’s a really good point to consider.

The issue occurs in both in the IDE and the Quixe interpreter. I expect the vast majority of players will be playing in-browser on Itch so Quixe is my main concern: I can live with the audio not working in-browser as long as it fails silently or displays an appropriate text alternative, but if it throws out an obvious “can’t find resource” message then that’s an absolute deal-breaker.

In terms of operating system, I’m using Ubuntu (which I gather is not particularly well supported by the IDE at the moment). I’d imagine that whatever I’m seeing in-browser will be encountered by some or all players, though.

From the documentation, alt-text for sounds seems like it may be meant for a situation where the interpreter is playing the sound, and the player needs a description of it.

If you are dealing with a situation where the interpreter doesn’t support sound, I don’t know if the alt-text would display or not. I’m just not sure how it’s meant to work.

It’s possible to test whether the interpreter supports glulx sound. Then you could write your code so that, if sound is not supported, the game wouldn’t even attempt to play the sound, and would display some text instead.

The phrase “if glulx sound is supported” is in the Glulx Entry Points extension.

1 Like

I don’t think anyone is. The feature was thrown in hastily and we never went over the design.

For image accessbility text, we have a clear mandate, at least for browser-based clients: when the image is displayed, add alt=“…” to the HTML. There’s no obvious equivalent for how audio accessibility should work.

1 Like

This seems as though it might explain the situation. I assumed the sound alt-text would be displayed when the sound couldn’t play in the same way that image alt-text is shown on screen when the image can’t be displayed. It seemed natural to expect that any feature intended to help a user who couldn’t hear would also kick in for a user who didn’t have working audio. The message that I’m seeing now would not help a deaf person at all.

This project is actually for a game jam and the deadline is in half an hour, so I don’t think I’ll dig around and investigate on this occasion. Still, I’ll be sure to try “if glulx sound is supported” next time I’m trying to include audio in anything - it may well provide a workaround. Thank you very much for the help!