📧 Message Board Archive

sound problems
Does anyone know why sound_set_vol would cause a game crash?

Also, some new sounds have a "pop" at the beginning of them (obviusly not part of the .wav file).  Any idea why?

Finally, what is the best way to have NO sound play on a warp instead of the "door creak"(with out warping from within a script)?  

All my .wav's are 22050 8bit mono...
Re: sound problems
: Does anyone know why sound_set_vol would cause a game crash?



: Also, some new sounds have a "pop" at the beginning of them (obviusly not part of the .wav file). Any idea why?



: Finally, what is the best way to have NO sound play on a warp instead of the "door creak"(with out warping from within a script)?



: All my .wav's are 22050 8bit mono...



Have you read the Sound FAQ?  That explains the popping.  As for sound_set_val, you have to set a currently-playing wav file with that, defined as a variable.  I think that's in the Sound FAQ too.



As for the no-sound for a warp... I dunno, but you can change the sound played from within Dinkedit.  Maybe setting it to -1 would make it so no sound would play, I dunno.
Re: sound problems
: : Does anyone know why sound_set_vol would cause a game crash?



No...Yes... :( Well, as far as I know, sound_set_vol does not work at all!!! ;( I asked this question in the old board (before this new board came up), but nobody really knew the answer back then. And, redink1, I couldn't find any words about sound volume in the sound FAQ.



My solution for this is "forget it". I just tried harder to find compatible sound and midi files so that I don't need to adjust the volume of the sound.



If you or someone else do know how to make sound_set_vol work, I will appreciate it. ;)
Uh... sound_set_vol works fine
: : : Does anyone know why sound_set_vol would cause a game crash?



:  No...Yes... :( Well, as far as I know, sound_set_vol does not work at all!!! ;( I asked this question in the old board (before this new board came up), but nobody really knew the answer back then. And, redink1, I couldn't find any words about sound volume in the sound FAQ.



:  My solution for this is "forget it". I just tried harder to find compatible sound and midi files so that I don't need to adjust the volume of the sound.



:  If you or someone else do know how to make sound_set_vol work, I will appreciate it. ;)



Uh... sound_set vol works_fine.  I used it in FIAT with the rain (the rain sound quieted when you entered houses on Tware, for example).
but... sound_set_vol didn't work for me
: Uh... sound_set vol works_fine. I used it in FIAT with the rain (the rain sound quieted when you entered houses on Tware, for example).



I looked at your FIAT scripts (i4-raini and i4-h6-bk, for example), and I found that there are 2 different things between your scripts and mine.



1. You used a global variable, but I only used a local variable. I don't think that should be a problem since I did not need the sound control to stay. (Hence, I didn't use sound_set_survive, either.)



2. The problem seems to be the "type" of the sound. You were using it to control a repeated sound, but I was trying to control the volume of a non-repeating sound. And the sound was as loud as ever... :(



What should I do?



int &asound;

&asound = Playsound(50,22050,0,0,0);

sound_set_vol(&asound, -2000);



Re: but... sound_set_vol didn't work for me
: : Uh... sound_set vol works_fine. I used it in FIAT with the rain (the rain sound quieted when you entered houses on Tware, for example).



: I looked at your FIAT scripts (i4-raini and i4-h6-bk, for example), and I found that there are 2 different things between your scripts and mine.



: 1. You used a global variable, but I only used a local variable. I don't think that should be a problem since I did not need the sound control to stay. (Hence, I didn't use sound_set_survive, either.)



: 2. The problem seems to be the "type" of the sound. You were using it to control a repeated sound, but I was trying to control the volume of a non-repeating sound. And the sound was as loud as ever... :(



:  What should I do?



:  int &asound;



:  &asound = Playsound(50,22050,0,0,0);



:  sound_set_vol(&asound, -2000);



Hmm... if you're only using it to lower the volume of a sound (where you don't plan on making the volume change at all throughout the D-Mod, and you always want it lower), then just use Sound Recorder or any other sound editor to lower the volume in there.
Re: but... sound_set_vol didn't work for me
: Hmm... if you're only using it to lower the volume of a sound (where you don't plan on making the volume change at all throughout the D-Mod, and you always want it lower), then just use Sound Recorder or any other sound editor to lower the volume in there.



Yes, that's clever. :o

But if I do want a non-repeated sound to have different sound volumes in different occasions, should I just have several wav files with different volume settings? Do you know any way that I can make sound_set_vol work for non-repeated sound, i.e. preset the volume of a sound before it comes out?
Re: sound...  Uh, Dan?...
Uh, Dan?...

I've read through the sound FAQ before and I just read through it again.  There is not one mention of a .wav file making a "pop" sound or anything like that.  If you're refering to the part about making sure the .wav has a "details" tab available, mine do.



About sound_set_vol...

If I'm understanding you, all I need to do is create a global var(does it have to global or does that just make it easier?) and set it to equal playsound and then do sound_set_vol where the global name replaces the sound bank number?



&globalvar = playsound(xx, xoxox, x, x, x) ;

sound_set_vol(&globalvar, -10000) ;

?



Re: pop!
: Uh, Dan?...



: I've read through the sound FAQ before and I just read through it again. There is not one mention of a .wav file making a "pop" sound or anything like that. If you're refering to the part about making sure the .wav has a "details" tab available, mine do.



: About sound_set_vol...



: If I'm understanding you, all I need to do is create a global var(does it have to global or does that just make it easier?) and set it to equal playsound and then do sound_set_vol where the global name replaces the sound bank number?



: &globalvar = playsound(xx, xoxox, x, x, x) ;



: sound_set_vol(&globalvar, -10000) ;



: ?



Odd, I thought Silencer put more detail about the pop effect in there.  Oh well.  I've found that sometimes messing with the hz and bit rate fixes it, but other than that...



As for the sound_set_vol, yeah, thats it.  It probably has to be a global, as it didn't seem to work for mimifish.
Re: pop!
: Odd, I thought Silencer put more detail about the pop effect in there. Oh well. I've found that sometimes messing with the hz and bit rate fixes it, but other than that...



That is odd. You must have edited it, to make me look like a lousy FAQ writer :P



By the way, I messed A LOT with sounds, and had the popping sound problem. One possibility: it has nothing to do with the sound. Some particular sound boards, such as SB Live! oems have very strange interpretations of static silence and aiff headers under WindowsXP due to driver & dx incompatibility. Chances are that other people will hear you sounds just fine.



If you want, send me the file, I can take it apart and see what else might be wrong. ;)



Silencer.