0
0

Hi all,

I’m having 2 problems which occur if there are sounds playing when I shut down my app by using the X button on the menu bar.

1) When I go to stop all the sounds that are playing, their handles are invalid. This is before calling system::release. Somehow FMOD seems to be aware that I’ve shut down the window and started releasing things???

2) Much more insidious: the "sound ended" callback that I’ve hooked up (works perfectly otherwise) doesn’t get called after closing the window, leaving me with a memory leak. Is there a way of triggering all the sound ended callbacks? or am I missing something obvious here.

Thanks for your help.

  • You must to post comments
0
0

[quote="pschuegr":4a7kw2ck]Hi all,

I’m having 2 problems which occur if there are sounds playing when I shut down my app by using the X button on the menu bar.

1) When I go to stop all the sounds that are playing, their handles are invalid. This is before calling system::release. Somehow FMOD seems to be aware that I’ve shut down the window and started releasing things???
[/quote:4a7kw2ck]

It doesnt do anything with windows or the operating system. Invalid handle means the sounds have stopped and your handles can’t be used any more, or your handles have actually been corrupted.

[quote:4a7kw2ck]
2) Much more insidious: the "sound ended" callback that I’ve hooked up (works perfectly otherwise) doesn’t get called after closing the window, leaving me with a memory leak. Is there a way of triggering all the sound ended callbacks? or am I missing something obvious here.

Thanks for your help.[/quote:4a7kw2ck]

You need to call System::update to get a callback.

  • You must to post comments
0
0

[quote="brett":1kka120i]
It doesnt do anything with windows or the operating system. Invalid handle means the sounds have stopped and your handles can’t be used any more, or your handles have actually been corrupted.
[/quote:1kka120i]

Right, I understand that. But what I’m saying is that I had a valid (channel) handle, the channel is playing and not stopped by the app, yet the handle still became invalid when I clicked to close the window, before I tried to stop the channel. Why did the handle become invalid if the channel has in theory not stopped?

[quote="brett":1kka120i]
You need to call System::update to get a callback.[/quote:1kka120i]

I’ve tried this. It works perfectly under normal conditions, but not during shutdown. That’s why I feel like the channels have already been stopped by some process under the hood.

Thanks for your time.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.