Page 1 of 1
Question about custom sound
Posted: Thu Oct 16, 2003 1:53 am
by theOmega
I followed the tutorial by jv_map using the workaround and it works fine. I was just wondering if it was possible to use a path name that points to a sound file within the map's .pk3 instead of having to put it in the mohaa sound dir.
wav
Posted: Thu Oct 16, 2003 3:55 am
by tltrude
Wav file or Mp3? Wav files can be in your pk3 in the sound/whatever folder. But, mp3 music files are not in main, so you can't add them to a pk3. You would have to distribute a sound folder along with your pk3.
Re: wav
Posted: Thu Oct 16, 2003 4:51 am
by small_sumo
tltrude wrote:Wav file or Mp3? Wav files can be in your pk3 in the sound/whatever folder. But, mp3 music files are not in main, so you can't add them to a pk3. You would have to distribute a sound folder along with your pk3.
Is that right I neevr knew, I had a mp3 of music in my monastery map, it worked well at home here but I must admit I never used it on a server. I might better look into that.
Thanks
Posted: Thu Oct 16, 2003 6:02 am
by jv_map
I think tltrude is right, mp3 sounds need not be in a pk3 file.
Any time remember to use 'loaded' in the alias definition for sounds in a pk3 file, 'streamed' for extracted sounds.
Opps
Posted: Thu Oct 16, 2003 9:02 am
by tltrude
Wait, the mp3's are in main/sound/music, so I guess you could put them in your pk3. But, it would sure make the pk3 larger, and most people turn the music off anyway.
Posted: Thu Oct 16, 2003 9:30 am
by theOmega
I can get it to work with the mp3 in the main/sound/amb dir with:
Code: Select all
local.master aliascache piano sound/amb/pianoman.mp3 soundparms 1.0 1.0 1.0 0.0 200 500 auto loaded maps "obj dm"
I can get it to work with the wav in the main/sound/amb dir with:
Code: Select all
local.master aliascache piano sound/amb/pianoman.wav soundparms 1.0 1.0 1.0 0.0 200 500 auto streamed maps "obj dm"
but i cannot get it to work at all if i have either sound format in my pk3 sound dir

.
Not sure what I am doing wrong, but i am sure that i need help

.
Posted: Thu Oct 16, 2003 10:58 am
by theOmega
While i am asking, how do you make it so walls dampen the sound?
Posted: Thu Oct 16, 2003 9:03 pm
by bdbodger
check what codec the wav file is useing . The sound will need to be in pcm format to use in a pak . You can open the sound with windows sound recorder and then use save as . Then change the codec format to pcm I am not sure what sample rates or bit rates work but you can test them and see . I made a map with PCM 22.050 kHz, 8 Bit, Mono that worked .
Posted: Thu Oct 16, 2003 9:48 pm
by theOmega
It seems as though i had to change the wav file to 22.020 kHz for it to work in the pk3. Today, for some reason, i got the mp3 to work also. I did change the sound source from a script_model to a sound_speaker. Not sure if that makes a difference. Thx to all for the help. Still wondering if its possible to have the sound be dampened by walls.
Posted: Fri Oct 17, 2003 3:01 pm
by jv_map
theOmega wrote:Still wondering if its possible to have the sound be dampened by walls.
It isn't

Posted: Sat Oct 18, 2003 1:08 am
by theOmega
Eh its ok. I accomplished what i set out to accomplish for the most part. Thx to all who helped. I really appreciate it.
Posted: Sat Oct 18, 2003 7:03 am
by small_sumo
Dl my monastery map and you will see the music comeing from where the guy is eating is a small mp3. Check the code to see how I did it.
