Browser version of game not playing sound or voice files

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
fishghost
Newbie
Posts: 17
Joined: Mon Oct 21, 2019 7:22 pm
Contact:

Browser version of game not playing sound or voice files

#1 Post by fishghost » Fri Aug 19, 2022 1:23 pm

Hi there!

Trying to put a browser version of our demo together for our itch page, but for whatever reason, sound and voice files aren't playing. (Music is)

Originally, one shot audio and voice files were in a .wav format, while music and looping sounds were in .ogg. For the web version, I converted those .wav files into .ogg in case that was the issue, but it didn't address the problem.

If in the same instance of running the game, I go back to a line that the player has already seen, the voice file plays correctly, as if the main issue is that the files just aren't loading the first time around. No error messages, and audio plays correctly if the game is played in anything other than HTML.

Any advice? Hope I was as thorough as possible with this information, but if I'm missing anything important, please let me know.

EDIT: Using the most recent version of Ren'py 7.5 (updated today) to compile the web build.

User avatar
PyTom
Ren'Py Creator
Posts: 15892
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Browser version of game not playing sound or voice files

#2 Post by PyTom » Fri Aug 19, 2022 4:06 pm

What browser are you using? Safari has problems playing .ogg files.

If you open the browser console, are you seeing any problems being logged?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

fishghost
Newbie
Posts: 17
Joined: Mon Oct 21, 2019 7:22 pm
Contact:

Re: Browser version of game not playing sound or voice files

#3 Post by fishghost » Fri Aug 19, 2022 4:16 pm

Tested on both chrome and firefox, and I'm not seeing anything audio related being flagged in the browser console. The issue was consistent with .wav files as well in both browsers, and in all cases, starting the game over allowed voice lines to play properly, but only if those lines had been accessed prior to starting over.

Ex. for a menu like this

narrator "line 1"
narrator "line 2"

menu:

• narrator "line 3"

• narrator "line 4"

• narrator "line 5"

The first playthrough of the game would have no working voice lines, but if I selected the top menu item "narrator line 3", returned to the main menu, and started over, the voice lines would play for line 1, line 2, and a line 3, but still wouldn't play for line 4 and line 5.

Let me know if providing game files or code would be helpful!

User avatar
PyTom
Ren'Py Creator
Posts: 15892
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Browser version of game not playing sound or voice files

#4 Post by PyTom » Fri Aug 19, 2022 6:39 pm

Can you pm me the game files, so I can build it and investigate here?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

fishghost
Newbie
Posts: 17
Joined: Mon Oct 21, 2019 7:22 pm
Contact:

Re: Browser version of game not playing sound or voice files

#5 Post by fishghost » Sun Aug 21, 2022 10:08 am

Sent via pm!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], enaielei, Google [Bot]