0
0

Hello,

I am a little confused to when these should be called. Previously, I called [b:3r51nsr5]set3DListenerAttributes () [/b:3r51nsr5]on each frame, and update () every 32 ms. This gave me undesired artifacts and hissing volume effects.

Then noticed it said in the documentation that[b:3r51nsr5] update ()[/b:3r51nsr5] should be called every frame, so I moved it there. Less issues, but fast moving objects still hiss. Moved both calls to be updated on each frame and now it sounds perfect as long as I am not using headphones.

I guess for performance reasons I should revise putting [b:3r51nsr5]set3DListenerAttributes ()[/b:3r51nsr5] in there? I could not see any big differences in my profiler, but I did not play alot of sounds so it probably does not matter.

Will I get performance issues later?

Thanks for any assistance you can give me.

  • You must to post comments
0
0

set3dListenerAttributes does no calculations at all, i’m not sure why you’d think it would be slow. System::update is what does all the work.

  • You must to post comments
0
0

The reason I asked was because in the docs it said update () should be called each frame. Now, that is alot and in some of the examples I see 50 ms intervals rather than per frame.

Anyway, thanks for your assistance as always, Brett. You got a wonderful API there.

  • You must to post comments
0
0

50 ms is per frame.

1s/50ms = 20fps. The pause is generally to simulate delay in graphics or something similar. Or just not kill the CPU for no good when an update every ms would do little good.

  • You must to post comments
0
0

If you update the 3d audio position information at a slower rate than the graphics framerate, you will get jerky sounding audio – if an object moves and the sound doesnt, it will sound wrong. Thats why you do it once per frame.

There is no performance issue here, as System::update is slow, it just does a few calculations and some channel management.

Saying there is hissing noise etc is something else entirely, that is not an effect of updating 3d positions.

  • You must to post comments
0
0

[quote:37yfepcf]50 ms is per frame.[/quote:37yfepcf]
Huh? Are you assuming I am rendering at 20 fps? 😕

[quote="brett":37yfepcf]Saying there is hissing noise etc is something else entirely, that is not an effect of updating 3d positions.[/quote:37yfepcf]

Well, not sure it is called hissing. When I start the sound, it is hearable to me and crystal clear, then suddenly it disappears (when an update has happened, probably?). It is still playing and hearable if I turn the speakers up, but seems to be at the correct position unlike when it was started.
[b:37yfepcf]
The strange thing is that it only happens with DSP’s[/b:37yfepcf] (does not seem to matter which one, I tried both normalize and lowpass) and if I deactivate them the sound is the same like in any professional game, ie good.

  • You must to post comments
0
0

You are probably not starting your sound paused and setting the position there.

  • You must to post comments
0
0

That did the trick. Thank you for your patience, Brett.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.