XAudio2 - Mastering Voice sample grabbing RRS feed

  • Question

  • I'm looking at using XAudio2 in a metro application.  My usage seems like it should fit XAudio2 well.  I simply want to be able to take multiple audio sources as input.  Each input source can be different (khz, channels, etc).  Each input would be mixed and I would get a single output (eg, n-channels, n-hz, etc).

    From what I understand (which could be wrong), the mixing from all the voices happens in the mastering voice and sent to an audio device.  I wish to not send the audio to a device, but receive the mixed audio buffer and write this to an encoder.

    I can see I can write a custom XAPO and receive samples, but that _seems_ to just receive samples from a voice effect chain (non mixed with the other voices).  Is there a way to do what I am describing using XAudio2?



    Tuesday, July 3, 2012 7:35 PM


  • Unfortunately, It is not really possible, as XAudio2 has been designed for realtime audio processing but not offline. Even if it is possible to capture the audio just before it is sent to the mastering audio (just place a single mix voice before the master voice and plug a custom XAPO as you suggest), you can't tell XAudio2 to process your audio as fast as it cans (i.e. you have a 5min audio to compute, It will take 5min to compute).

    In order to achieve what you are looking for, you will have to perform the whole process yourself (Sample Rate Conversion, mixing....etc.)

    Alexandre Mutel - SharpDX - NShader - Code4k

    • Marked as answer by jmorrill Wednesday, July 4, 2012 12:14 AM
    Tuesday, July 3, 2012 9:43 PM