0
0

Hi,

i made a program in which i have a event ‘engine’, with the behavior ‘just failed if quitest’
and with maxplaybacks=10. When i defined 30 ‘engine’ events, there is no problem, the
events are stolen in the right order. But when i’m using around 300 events, it seems to
have a problem. The behavior is very strange. Is it normal ??

Thanks,

gothmog

  • You must to post comments
0
0

It should work properly in that situation. What behaviour are you seeing?

  • You must to post comments
0
0

in my application, i’m driving a car in a city with around 300 other cars in it.
In most of the cases (around 75%), the behavior is good. i hear correctly the cars which pass me.
But quite often, a car passed me and i don’t hear it. I don’t encounter this problem in ‘steal quitest’.

  • You must to post comments
0
0

Are you restarting the sounds once they have been stolen? Or is it a case of starting your car engine noises, which then will only leave the 10 loudest playing?

  • You must to post comments
0
0

Yes I try to restart the sounds once they have been stolen.
Sorry but i don’t understand your second question (i have a poor english level 😳 ).

I don’ t have this problem when i use a smallest scene with less cars (even when i use ‘just fail if quitest’) .

thanks,

  • You must to post comments
0
0

How are you doing the restart? I use an info only event, to see if it’s going to restart OK before actually starting it.

  • You must to post comments
0
0

Yes, i use an info only, set the 3D attributes of the event, and try to restart it. I also use a ‘stolen’ callback on the events when they are stolen.

  • You must to post comments
0
0

What does your stolen callback do?

  • You must to post comments
0
0

Here is the code of my callback function :

[code:xwqwzuo4]
FMOD_RESULT F_CALLBACK myCallbackFunction(FMOD_EVENT aEvent, FMOD_EVENT_CALLBACKTYPE aType, void *aParam1, void *aParam2, void *aUserData)
{
switch ( aType )
{
case FMOD_EVENT_CALLBACKTYPE_STOLEN:
{
Sound
vSound = (Sound*) aUserData ;
if ( vSound )
{
vSound->SetState(Sound::WAS_STOLEN) ;
}
}
break ;
default: // No default
break ;
}
return FMOD_OK ;
}
[/code:xwqwzuo4]

And when a sound is in the state WAS_STOLEN, i try to restart it in the update function.

But as i previously said, my program works when i use a smaller scene with less cars
(it works with 30 cars and maxplaybacks=3 for example).
That is why i thought the problem came from the high number of event instances and the size of the scene.

  • You must to post comments
0
0

[quote="gothmog":7amq38x2]Here is the code of my callback function…[/quote:7amq38x2]
Thanks, that looks ok.

[quote="gothmog":7amq38x2]And when a sound is in the state WAS_STOLEN, i try to restart it in the update function.[/quote:7amq38x2]
Could you post the code that does this please?

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.