Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
irrklang::ISound::setPosition() performance lack

swnghty
Registered User
Quote
2014-11-07 08:34:27

Hi!

In the process of profiling my game application, I found that the function call irrklang::ISound::setPosition() leads to a significant reduction in performance.
After a series of experiments, I found that the decrease in performance occurs in the following situation:
- created a few sounds
- none of the sounds is not running on the play
- for each 3D sound setPosition() is called for each frame

Very Sleepy profiler indicates that the function irrklang::ISound::setPosition() calls irrKlang::createAudioRecorderDeviceList() function in this case.

After some sound played, reduction in performance is disappears.

Is it possible to fix this?

Thanks.

P.S. irrKlang version is 1.5.0


niko
Moderator
Quote
2014-11-07 15:05:28

The profiler obviously shows something wrongly, because the implementation of that function is this:


void CIrrKlangSound::setPosition(vec3df position)
{
SYNCHRONIZE_WITH_SOUND_ENGINE(;) // this does a thread lock
Position = position;
}


That is all. Nothing special in that function. It could be that there is a performance drop somewhere, but I think your profiler shows something wrongly.


swnghty
Registered User
Quote
2014-11-08 14:00:09

Thank you for your response.
I'll keep that in mind and try to understand in more detail what is happening.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact