Sounds playing twice?

7 views
Skip to first unread message

Hanon Ondricek

unread,
Mar 9, 2017, 12:41:20 PM3/9/17
to AXMA Story Maker
I've noticed that when I play a defined sound in a passage, quite often it will play twice. Not always, but maybe 80 percent of the time. Perhaps one second of the clip will play, then it will start over again and play to the end. This can be a bit awkward.

I've experimented by moving the macro for the sound to different places in the passage, thinking maybe it was getting re-triggered if it was called at the beginning or end. I have my sound files in a folder in the same location as the html file. As it happens, in this passage, I'm also calling a picture, new music, and a sound at the same time. Is this too much to handle at once? I guess I'll experiment with that too.
---
[[File: med/BVjumpscare.mp3]]

It happens so fast-

[[File: med/skullstalker3.jpg]]

<<sound 'scream'>>
---
Most of the time, there is also continuous music playing, I haven't yet experimented to see if this affects it, but I will try. 

I just tried an export.html file and it played once, so I was thinking this might just occur in the IDE, but then I moved the html file and it played twice again.

Is there anything I can do about this? 

I'm running on Mac El Capitan currently. I've not tried it on PC. 

Hanon Ondricek

unread,
Mar 9, 2017, 12:50:46 PM3/9/17
to AXMA Story Maker
I think I may have fixed this? I called the jpg first, then the text and choices, and put the call for the music and the sound last. I'll keep trying to see if it happens again.

But if there's some specific trick to this based on how the page assembles and loads the sounds that is causing this, it would be helpful to know! It seems like if the sound was replaying after it loaded, it wouldn't play in the first place? Is it maybe starting the sound, writing the sound to memory and then starting it over?

Thanks!

Hanon Ondricek

unread,
Mar 9, 2017, 12:55:24 PM3/9/17
to AXMA Story Maker
Nope, not fixed. Here's some more info though:

If I export the game to HTML, it seems to work properly and the sound plays once.

If I close the tab the game is playing in, and then re-open and play it, the sound plays twice...is the sound playing because it's cached somehow, but the game is re-writing it to the cache and then re-starting it?

3rd or fourth play, it's back to playing once. Weird.
Reply all
Reply to author
Forward
0 new messages