Inform 7 Home Page / Documentation
§23.8. Declaring and playing back sounds
Sound effects are accommodated on the same basis as illustrations. The relevant media files need to be placed in a subfolder of the project's ".materials" folder, but this time called Sounds rather than Figures, so for instance:
Example.inform
Example.materials
Figures
Woodlands.png
Blackberry.jpg
Red Admiral Butterfly.png
Sounds
Rustling leaves.ogg
Again, these must be declared in the source text:
And they can be played using a special phrase:
play (sound name)
This phrase causes the sound effect to be played. If the option "one time only" is used, it will have no effect if the sound effect has been played before. Example: