What is the difference between "priority" and "steal priority".
The term "steal priority" doesn’t appear in the Fmod Designer PDF manual (at least the version matching my version of designer 4.27.07 for my current project).
- mattconnolly asked 7 years ago
Yeah, we really should get this in the manual. Here’s a cut’n’paste explanation that I gave someone else recently :
[quote:lck3amcb]"Steal Priority" is only relevant if you use a simple event instance pool (which has to be enabled in code).
Normally, every event has its own "Max playbacks" value which determines how many instances of that event you can play back at the same time. When you use a simple event instance pool, you’re specifying a global pool of instances that will be used for all simple events – this means that the "Max playbacks" for each individual event is ignored and when the programmer calls getEvent on a simple event, FMOD will grab an event instance from the global simple event pool.
This can be a nice optimization if you have a lot of simple events. But one downside is that, when all event instances in the simple event instance pool are in use then FMOD needs to steal an instance from somewhere – because we’ve got many different events all using the same pool of event instances, we can end up with, say, a gunshot event stealing a background music event – which means you shoot your gun and the music cuts out.
So, "Steal priority" allows us to manage this problem. When you’re using a simple event instance pool and an event instance needs to be stolen, FMOD will only steal an event instance with a "Steal priority" less than or equal to the event you want to get. So you can give your background music a high "Steal priority" and your gunshots a lower "Steal priority" and then your guns will never cause your BGM to cut out.
Please login first to submit.