Sounds aren't working? [SOLVED]

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
User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Sounds aren't working? [SOLVED]

#1 Post by quacksapup » Sat Feb 15, 2014 7:22 pm

Hi guys,

My sound code is:

Code: Select all

play sound "sfx/quake.wav"
It doesn't work. And it's not just this one, but for all my sound. The volume is up and working, and I have this set to True in my options.

Code: Select all

config.has_sound = True
What am I doing wrong? The music and voice work, but not the sound.

Thanks!
Last edited by quacksapup on Sat Feb 15, 2014 8:12 pm, edited 1 time in total.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Sounds aren't working?

#2 Post by xela » Sat Feb 15, 2014 7:45 pm

Incompatible wav encoding? Faulty path (Ren'Py will not throw a path error with sound...)?
Like what we're doing? Support us at:
Image

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Sounds aren't working?

#3 Post by Asceai » Sat Feb 15, 2014 7:47 pm

What happens if you try to turn out of your

play music "path"
statements to
play sound "path"

keeping the path the same? If that works and the music plays, that hints at a problem with the path or with the encoding.

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#4 Post by quacksapup » Sat Feb 15, 2014 7:49 pm

xela wrote:Incompatible wav encoding? Faulty path (Ren'Py will not throw a path error with sound...)?
It doesn't say there's a path error... How do I know if something is incompatible? Should I try .mp3?

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#5 Post by quacksapup » Sat Feb 15, 2014 7:50 pm

Asceai wrote:What happens if you try to turn out of your

play music "path"
statements to
play sound "path"

keeping the path the same? If that works and the music plays, that hints at a problem with the path or with the encoding.
It's not the music, it's the sound that doesn't work. The music works perfectly. But I need it in the background as the sound plays, so it's not like I can switch them.

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Sounds aren't working?

#6 Post by Asceai » Sat Feb 15, 2014 7:55 pm

Yeah, I'm saying that because the music is working, if the sound channel isn't working you should be able to change 'play music' to 'play sound' and the music will stop working. If it still plays, it's a problem with your sound or you've put the sound file in the wrong place.

Anyway, Shift+D, click 'filename list' and your sound file should appear in that list with the same name you used in your play statement. If not it's a path error.

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#7 Post by quacksapup » Sat Feb 15, 2014 8:03 pm

Asceai wrote:Yeah, I'm saying that because the music is working, if the sound channel isn't working you should be able to change 'play music' to 'play sound' and the music will stop working. If it still plays, it's a problem with your sound or you've put the sound file in the wrong place.

Anyway, Shift+D, click 'filename list' and your sound file should appear in that list with the same name you used in your play statement. If not it's a path error.
Ah, I see.

So I just tried that out. The song is .mp3 and I switched it from 'play music' to 'play sound' and it worked anyway. The sfx are in my play statement. So perhaps maybe it is something to do with the .wav.

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#8 Post by quacksapup » Sat Feb 15, 2014 8:11 pm

quacksapup wrote:
Asceai wrote:Yeah, I'm saying that because the music is working, if the sound channel isn't working you should be able to change 'play music' to 'play sound' and the music will stop working. If it still plays, it's a problem with your sound or you've put the sound file in the wrong place.

Anyway, Shift+D, click 'filename list' and your sound file should appear in that list with the same name you used in your play statement. If not it's a path error.
Ah, I see.

So I just tried that out. The song is .mp3 and I switched it from 'play music' to 'play sound' and it worked anyway. The sfx are in my play statement. So perhaps maybe it is something to do with the .wav.
Converting the .wav to .mp3 worked! It was a problem with the .wav files. It's accepting .mp3. I have no clue why the .wav wasn't working... but, aw well! Thanks for helping me figure this out guys!

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Sounds aren't working?

#9 Post by xela » Sat Feb 15, 2014 8:12 pm

quacksapup wrote:
Asceai wrote:So I just tried that out. The song is .mp3 and I switched it from 'play music' to 'play sound' and it worked anyway. The sfx are in my play statement. So perhaps maybe it is something to do with the .wav.
WAV (uncompressed PCM only)

Just find any converter online or offline and covert your files from wav to wav. I am yet to see a software that would give me a wav file Ren'Py couldn't play on default settings... (Audacity is free and very good).
Like what we're doing? Support us at:
Image

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#10 Post by quacksapup » Sat Feb 15, 2014 8:13 pm

xela wrote:
quacksapup wrote:
Asceai wrote:So I just tried that out. The song is .mp3 and I switched it from 'play music' to 'play sound' and it worked anyway. The sfx are in my play statement. So perhaps maybe it is something to do with the .wav.
WAV (uncompressed PCM only)

Just find any converter online or offline and covert your files from wav to wav. I am yet to see a software that would give me a wav file Ren'Py couldn't play on default settings... (Audacity is free and very good).
I'm a music composer so I just used my music software to do that for me. ^^ Thank you for your help.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Sounds aren't working?

#11 Post by xela » Sat Feb 15, 2014 8:17 pm

quacksapup wrote:Thank you for your help.
I didn't help much but you're welcome!
quacksapup wrote:I'm a music composer
Well, you see... that's scary because I can only imagine what a professional software output might be like :lol: Anything simple soft throws up seems to work fine with Ren'Py.
Like what we're doing? Support us at:
Image

User avatar
quacksapup
Regular
Posts: 48
Joined: Fri Jan 04, 2013 3:43 pm
Projects: "Heartbeat" (In Progress)
Contact:

Re: Sounds aren't working?

#12 Post by quacksapup » Sat Feb 15, 2014 8:24 pm

xela wrote: Well, you see... that's scary because I can only imagine what a professional software output might be like :lol: Anything simple soft throws up seems to work fine with Ren'Py.
It'll be okay. The volume on the converted sounds are the same even after export. :^]

Post Reply

Who is online

Users browsing this forum: Google [Bot], rayminator