0
0

I have multiple objects reaching a certain point at the same time and when they do, they all play the [b:6nvezmvp]same[/b:6nvezmvp] sound.

When it’s 1 object, everything is fine. When 2 objects reach it and play the sound, the volume is nearly 2x louder. If it’s more than 2, the volume is even more louder.

Is there a way to turn this additive sound volume thing off?

I tried

[code:6nvezmvp]FSOUND_Sample_SetMaxPlaybacks(sample[WOOSH], 1);[/code:6nvezmvp]

It works fine – when the objects reach a certain distance, only 1 ‘woosh’ sound is played like I want to.

However, I have instances where objects reach the distance very close to one another time-wise.

For example:

Object A reaches the point, and a ‘woosh’ sound is played. Object B then reaches the point before the previous ‘woosh’ sound is done playing from object A, so it doesn’t play the sound – which is a problem.

What I want is for sounds to be playing like normal, but not add to the the volume if they play at the [b:6nvezmvp]exact same[/b:6nvezmvp] time. Not limit the amount of max instances, but limit the max volume I guess.

Will someone help me accomplish this?

  • You must to post comments
0
0

I didn’t want to start a new topic about this, but now I have another problem.

I’m using this code to check if a channel is free, and if it is – then play a sound on it.

[code:1fanr289]for(int i = 0; i < 4; ++i) // if channel is free, play SFX on it
{
if(FSOUND_IsPlaying(i) == false)
FSOUND_PlaySound(i, sample[n]);
}[/code:1fanr289]

Problem is this doesn’t exactly work.

I have a bullet firing roughly twice per second, and every time it’s fired, it goes through this code. The first time it plays fine, but the second time, the sound doesn’t play.

What gives? I know twice per second isn’t too much to be asking, so this isn’t a speed issue…

I’m using this code because while I realize that FSOUND_FREE is available as a parameter for channel, I can’t have it selecting a certain channel… even if it’s not being currently used (sounds are not playing on it).

It would be nice if something like FSOUND_FREE existed where I can choose a range of channels. :roll:

  • You must to post comments
0
0

Found out the problem – forgot to return out of the for loop. This code works fine. Gotta love the silly programming mistakes.

[code:2ihq4q4i]for(int i = 0; i < 4; ++i) // if channel is free, play SFX on it
{
if(FSOUND_IsPlaying(i) == false)
FSOUND_PlaySound(i, sample[n]);
return;
}[/code:2ihq4q4i]

  • You must to post comments
0
0

I success install the recorder to my website, but I found out that the sound recording from the recorder is too soft, hardly to listen it.
May I know have any way can increase the volume of recording/playing?
Thank you.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.