Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 11 Sep 2009
Offline Last Active Oct 15 2014 07:15 AM

Posts I've Made

In Topic: XAudio2: FXMasteringLimiter produces clipping ?!

12 April 2011 - 09:12 AM

Thanks ^_^

In Topic: XAudio2: FXMasteringLimiter produces clipping ?!

11 April 2011 - 08:40 AM

Thank you very much for you reply. Getting help with native XAudio2 implementations is rare, and knowledge is golden (or kept like secrets) in this area.

>> I mean do you directly start and stop your source voices with a new buffer for each sound? <<

Correct. I've attached the FXMasterLimiter to the MasterVoice with initialstate set to true and I am playing all SourceVoices directly with a newly created buffer for each sound, while the SourceVoices are pre-created on game start and only a fixed amount of them exists with preconfigured wave format settings.

>> If you are stopping the voice you might want to use the XAUDIO2_PLAY_TAILS flag to make sure the playing buffer is not truncated which could potentially produce pops/clicks. <<

I've tried this, but it did not have any effect. I think it's used for Reverb effects and co. and would make sense to use there, but it didn't help with my particular problem.
I've even tried delaying the Stop() for a few frames or using OperationIDs to delay the stopping proccess, but this didn't help.
I also played around with the FXMasterLimitere EffectParamers (Loudness and Release) but no combination helped.

>> Do the sounds you are submitting always start and end with silence? <<

Here you got me on the right track. The soundeffect I was playing didn't have a silence on the end. After adding a minor silence at the end, I've got rid of the glitch after stopping the SourceVoice. I am stopping the SourceVoices as soon as the BuffersQueued is zero and the pCurrentBufferContext is NULL.


Thank you very much for your piece of information which helped me finding this problem.

I will keep sure the mastered non-loopable sound assets will have a short silence on start and beginning. Do you know which length at the end would make sense best? Is there any standard for this?

Regards from Germany,


In Topic: The XAudio2 graph

09 March 2011 - 06:01 AM

You can use XAudio2 callbacks or use the bufferstate of the SourceVoice directly, and check if this is empty.
if (state.pCurrentBufferContext == NULL && state.BuffersQueued == 0) 

When you shutdown the game, you can stop all you running SourceVoices and delete them afterwards (prior shutting down XAudio2).
Obviously this will produce glitches, lower the volumes for a few frames (fadeoff) until destroying it.

In Topic: XAudio2, XAPOFX Effects and VolumeCurves

15 September 2009 - 12:31 AM

Thank you very much for your detailed answer!

In Topic: XAudio2, XAPOFX Effects and VolumeCurves

14 September 2009 - 04:30 AM

I need a small help with volume curves & distances.

It works fine I can hear a difference in the loudness when I am near or far from the object, but the problem is the volume never goes really down to zero even if DSPSettings.pMatrixCoefficients[0] and DSPSettings.pMatrixCoefficients[1] are both 0.0 (correct with the right CurveDistanceScaleFactor) (I am using the default linear curve) - so that I can still hear the object in thousands of meters away. It works fine in the 3DExample, but I followed it explicitly and when I have 0.0 & 0.0 pMatrixCoefficients I still hear the sound. What can be the reason for this? My Curve is: 0.0, 1.0, 1.0, 0.0 and the matrixcoef's are correctly to 0.0 at my wished distance but I can still hear a sound.

The problem has been solved. I noticed that a change via SourceVoice->SetChannelVolumes() (with the values from pMatrixCoefficients) worked fine. After further investigation, I found out that the problem was the SourceVoice's sendlist. After using a correct sendlist I was able to use SetOutputMatrix() again.

[Edited by - Iveco on September 15, 2009 6:30:30 AM]