Sounds not playing?

I’m trying to include sounds in my game (need to for my project to get my marks) however, nothing is happening.

I have looked in the documentation, Chapter 23 section 8, where it says all about the sounds, and have done exactly what it wants

Sound of Hi Ho is the file “Hi Ho.ogg”.

Sound of Standing woods is the file “Standing woods.ogg”.

Sound of Walking woods is the file “Walking woods.ogg”.

Sound of Werewolf roar is the file “Werewolf roar.ogg”.

Sound of Werewolf dying is the file “Werewolf dying.ogg”.

(Have been line spaced, but also have done one line after another)

and then to try and play the sounds;

After going to Forest path North when WWattack is true:
now the description of Forest path North is “As you move down the path a little more, you suddenly hear a loud roar to your right. When you turn towards the bush, you see a flash of brown before your vision gets filled with the black dirt below. Your Iron dagger flies out of your hands as you hit the deck. A cry of pain comes out as you quickly gather yourself, now having this massive beast on top of you. You scream out, only able to see its golden yellow eyes and its drooling saliva that is now pouring over your face as it roars out again. You have to push it off you!”;
now the Iron Dagger is in Forest path North;
play the sound of Werewolf roar;
continue the action;

But no sound is playing? I have also tried a different place, code and sound file (After going to x room for the first time, play x file) with no success. Tried releasing and playing in browser to see if that fixes anything, but no luck. This is my materials folder. gyazo.com/1056185d9c3164744fbdf797d0262f6c

The IDE and the browser interpreters (current ones) do not support sound.

Try it in Windows Glulxe or Gargoyle, or Zoom or Gargoyle on Mac.

The Windows Inform front-end should handle sounds correctly, but yes, the OSX Inform front-end does not. To diagnose any further the original poster needs to say what OS they’re using.

Oh that’s cool! All my heavy media games were done on Mac, so I never knew the Win IDE could play sound.

I am using Windows 8.1

Then there’s no obvious reason for the sounds to not play. Presumably at the appropriate point you do get the “As you move down the path a little more…” text? If you would post a complete example then it’s likely someone can work out what’s wrong.

Examples:
gyazo.com/6d82e675611c1bf5b467d1f45cfa4138
gyazo.com/42bc14720080df7184fc7175971a9b0b
gyazo.com/d5d46474380e2dbdf0ba897e6aa100c1

I get no errors, just no sound playing. I am on Windows 8.1, using Inform 7 version 6M62. All my sound files are in the OGG format, as said to do.

Just as I post that, I find the reason. I was on the Z-code format. However, then I can’t use the parchment interpreter? Of which I need, because I need the in-browser player?

Also, as I am on the subject of sounds. A few questions

  1. Can you loop sounds to play over and over again
    2)Can you stop sounds? So if I had a soundtrack, I can start it entering a room, and then stop it a few rooms later?
  2. Can more than one sound play at once?

There’s a browser player for Glulx also, called Quixe. Unfortunately I don’t believe it supports sound at the moment.

The answer to all of your questions is “yes”. Try the Music extension. (Which I now see has a stupid bug in the looping code, let me fix that.)

Have you tried taking out “continue the action”?

I don’t remember ever using that after a sound call, and while “continue the action” seems innocuous, is there any chance it might be jumping to the next rule and cutting off the sound before it starts?

I don’t know how it works, so I’m just curious.

Daniel’s Music extension has been invaluable to me and easy to use. I usually don’t know what I’m doing, and I managed three-track playback with individual cues overlapping based on gameplay.

–And yes. If you have sound in your game it won’t play in browser interpreters.

It’s also a good idea to use Emily’s Glulx Entry Points so you can write stuff into rules like “If glulx sound is supported…” and do something else proactively if sounds are important to the gameplay.

Yes, out of the box sound isn’t supported for Z-code. It is possible to get sound to work with Z-code, with some fiddling, but relatively few Z-code interpreters support sound anyway, and Parchment isn’t one of them.

The sound support for Glulx is rather better, but still not good for browser-based interpreters - the standard Glulx browser interpreter, Quixe, doesn’t support sound, either. At present there basically isn’t any way round that if need web-based play.

@draconis Thanks for saying about Quixe, that works fine! I’ll jus thave to make a non-sound version for the browser and a sound version for the Gblorb file. Maybe I can include the installation for a program to play the Gblorb file in my game ZIP file.

I am now using the extension (never used extensions before, so really confused). If I have any issues mind if I PM you on here instead of making more and more threads?

Thanks to everyone for helping me, once again!

You’re welcome to PM me, or to make threads; making threads hurts nothing and preserves the answers for others who search later.