Channels are reference counted. If a channel is stolen by the FMOD priority system, then the handle to the stolen voice becomes invalid, and Channel based commands will not affect the new sound playing in its place
if my program have some FMOD::Channel* handle, then this pointer should point to some region of memory. If this handle stealed for another channel, how does FMOD distinguish two pointer in my program – one pointing to new channel, and other – for stolen?
So there pointers should be two different pointers, the old one, stolen, should point to something wich can say "I’m stolen" or "Playing is finished". But how can FMOD can know that my program do not have pointers to stolen channel, and release this something, wich can report that sound was stolen? If this something remains forever, then this is memory leak. The only way to avoid this – explicitly say to FMOD than my program do not use this (Channel*). But I do not see any Channel::release method or something like this.
- Winnie asked 12 years ago
FMOD_RESULT fmod_res = fmod_system->playSound(FMOD_CHANNEL_FREE, m_sound, false, &channel);
(fmod_res == FMOD_OK);
max channels == 3.
so, Channel* – is not pointer. the least 2 bytes used for playcount.
I have a problem, than FMOD plays a sound 64 times, and than stop playing sounds. I thought becouse I missed releasing of something, but I know what exatly.
- Winnie answered 12 years ago
hi what is the channel count in System::init.
Please read the ‘virtual voices’ tutorial in the documentation. Your extra voices are ‘quiet’ because they have gone virtual. You want to avoid channel stealing just by increasing the channel count.
Please login first to submit.