Page 1 of 1
help with custom sound
Posted: Thu Oct 11, 2012 8:32 pm
by crisman
I made a custom sound, and I want it to play inside a small area. I did the script playSounAt, but it won't work, and I get an error:
Trying to play non-mono 3D sound
the complete script is: playSoundAt("fountain", 11, 26, 5)
I don't understand how I have to modify the sound, I already transformed it from stereo to mono, but still doesn't work. Funny thing is: if I use the script playSound("fountain") it works wonderfully. But obviously is not what I want since I hear the fountain everywhere...
Any advice?? Am I missing something?
I use audacity for audio editing, exported the file from .mp3 to .ogg
Thank you!
Re: help with custom sound
Posted: Thu Oct 11, 2012 8:39 pm
by Komag
it definitely has something to do with the exact sound format and mono/stereo/something. Some of the original sounds also won't work and give the same error, while others work fine with it.
Re: help with custom sound
Posted: Fri Oct 12, 2012 8:08 am
by antti
I think the catch here might be that it should be .wav
We use .ogg only for the music so there might be some unexpected behavior if they are used elsewhere.
Re: help with custom sound
Posted: Fri Oct 12, 2012 5:53 pm
by crisman
Thanks for the answer, but unfortunately it doesn't seem to work neither. I've converted it in .ogg, .wav, even .mp3 but still not working.
PlaySound instead works with all format. Not sure what I'm doing, maybe I wrote the script playSoundAt ina a wrong way?
I've also converted stereo to mono - but still no luck
Re: help with custom sound
Posted: Fri Oct 12, 2012 6:42 pm
by Komag
you can test your script using "teleport" sound, it will work if the script is right:
Code: Select all
playSoundAt("teleport", 1, 14, 18)
this would play it on level 1 at x14 y18 - it's somewhat quiet so you should try standing one square away to test, turned to your left or right so you can hear whether it's working directionally.
Re: help with custom sound
Posted: Fri Oct 12, 2012 10:08 pm
by crisman
Thanks for the tip Komag, the script worked perfectly, so it's a problem of the file format somehow...
Re: help with custom sound
Posted: Fri Oct 12, 2012 11:03 pm
by LordGarth
sounds should be 16 bit wav files. Also you can set min and max distance
minDistance = 5,
maxDistance = 6,
LG
Re: help with custom sound
Posted: Fri Oct 12, 2012 11:35 pm
by crisman
it turns out I was already exporting files in 16 bit D:
So unfortunately it's not this problem.
Re: help with custom sound
Posted: Sat Oct 13, 2012 9:33 am
by petri
crisman wrote:Trying to play non-mono 3D sound
If you are still getting this error, then your wav is in stereo. 3D sounds must be mono.
Re: help with custom sound
Posted: Sat Oct 13, 2012 4:15 pm
by crisman
Thank you everyone, now it works!
I've redone everything from beginning from my .mp3. I think my mistake was converting the .ogg I originally made the first time into the .wav I've have used until now.
Otherwise I don't know what else could it be...