0
0

The function is normally called like this:

[code:rm2d3m0o]
VERIFYEX (m_pChannel->set3DAttributes (
NiPoint3Helpers::ToFmodExVector (m_pNi->GetWorldTranslate()),
NiPoint3Helpers::ToFmodExVector (NoVelocity) // TODO
),
== FMOD_OK);
[/code:rm2d3m0o]

for the debugging purpose here I modified the call this way:

[code:rm2d3m0o]
const FMOD_VECTOR* pWT = NiPoint3Helpers::ToFmodExVector (m_pNi->GetWorldTranslate());
if (m_pChannel->set3DAttributes (
pWT,
0
) == FMOD_ERR_INVALID_HANDLE)
{
ASSERT (0);
LOG (L"FMOD_ERR_INVALID_HANDLE: %f2;/%f2;/%f2;", pWT->x, pWT->y, pWT->z);
}
[/code:rm2d3m0o]

This call gets called a couple of hundret times without any problem. But suddenly – I am not sure what happens then – it begins returning FMOD_ERR_INVALID_HANDLE each call.

The values are perfectly valid as the log file entry states:

[code:rm2d3m0o]
game::audio::Sound::UpdateFmodExSound: FMOD_ERR_INVALID_HANDLE: 144.330001831055/130.759994506836/259.190002441406
[/code:rm2d3m0o]

Can you please tell me under which circumstances this value is returned?

Regards
Felix Kollmann

  • You must to post comments
0
0

it says invalid handle, not invalid parameter.

Your sound has problably ended, so the channel is not valid any more. It could also have been stolen if you havent specified enough channels.

  • You must to post comments
0
0

You are right. The sound ended.

I added an check fir Channel::isPlaying(). This brings me to another question: When does a sound need to be updated? I guess even if virtual (because it might become hearable if moved) but not when being paused or muted.

Is Channel::getMute() recursive or do I have to check the ChannelGroups hierarchie, too?

Regards
Felix Kollmann

  • You must to post comments
0
0

[quote="fkollmann":122rhc9u]You are right. The sound ended.

I added an check fir Channel::isPlaying(). This brings me to another question: When does a sound need to be updated? I guess even if virtual (because it might become hearable if moved) but not when being paused or muted.
[/quote:122rhc9u]

A sound is not updated, do you mean System::update. Check the docs for System::update to see what it is used for.

[quote:122rhc9u]
Is Channel::getMute() recursive or do I have to check the ChannelGroups hierarchie, too?

Regards
Felix Kollmann[/quote:122rhc9u]

Not sure what you mean by recursive, there is nothing under or attached to a channel, if you want to mute everything then get the master channel group and mute that.

  • You must to post comments
0
0

Sry, I’m talking about Channel::set3DAttributes(). When I call Channel::getMute() does it check for its parent ChannelGroups and their parents for being muted, too?

  • You must to post comments
0
0

you call set3dattributes when you want the sound to move.
No it does not check channelgroups if you call setmute that would be a bug. I don’t know why you would expect that.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.