0
0

from documentation:
[i:e3at0x78]
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
[/i:e3at0x78]

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.

  • You must to post comments
0
0

[code:iekzumg3]
for (;;)
{
FMOD::Channel *channel;
FMOD_RESULT fmod_res = fmod_system->playSound(FMOD_CHANNEL_FREE, m_sound, false, &channel);
(fmod_res == FMOD_OK);
Sleep(1000); //Windows.h!!!
LOG_DEBUG("%p", channel);
}
[/code:iekzumg3]
max channels == 3.

output:
[code:iekzumg3]
10020002
10010002
10000002
10000003
10000004
10000005
10000006
10000007
10000008
10000009
1000000A
1000000B
1000000C
...
[/code:iekzumg3]

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.

  • You must to post comments
0
0

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.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.