XNA Creators Club Online
Page 1 of 1 (8 items)
Sort Posts: Previous Next

Zero output voices for a submix voice?

Last post 05-06-2008 7:38 PM by Dugan. 7 replies.
  • 04-25-2008 7:35 PM

    Zero output voices for a submix voice?

    For various reasons, I want to hang on to submix voices that may temporarily not be connected to anything. However, I get a debug mode breakpoint when I pass in a send list of 0 voices, and the output in the debugging window is this:

    XAUDIO2: ERROR: OutputCount must be greater than zero
    XAUDIO2: ERROR: pOutputVoices must be non-NULL
    XAUDIO2: ERROR: Invalid pSendList argument

    I don't see why setting a voice to send to no output would be invalid. It simply means nobody will ask it for data until it gets re-connected somewhere.

    Comments, suggestions or work-arounds?

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-25-2008 8:06 PM In reply to

    Re: Zero output voices for a submix voice?

    Hi, you could set the output voice to only the Master voice, maybe?
  • 04-26-2008 5:04 PM In reply to

    Re: Zero output voices for a submix voice?

    But that's exactly what I don't want! The output voice of the submix voice is already the master voice. When reconfiguring the network, I'd like to disconnect some voices, and then later re-connect them. I can't really see any good reason why that shouldn't be allowed.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-26-2008 7:22 PM In reply to

    Re: Zero output voices for a submix voice?

    So what's the problem? Do Submix Voices with no input steal processing cycles?
  • 04-26-2008 8:13 PM In reply to

    Re: Zero output voices for a submix voice?

    jwatte:
    For various reasons, I want to hang on to submix voices that may temporarily not be connected to anything. [...]

    Might be worth to share some of the various reasons, e.g. if the gial is to save CPU cycles or it the goal is just to silence the voice(s).

    jwatte:
    Comments, suggestions or work-arounds?

    A hacky(?) suggestion/workaround seems to be to create something like a silencer voice (a submix voice whos volume is set to 0) and use that in the SetOutputVoices call(s).

    We are boki. The rest is known.
    The not so known part of the rest: It is Björn or Bjoern, but never Bjorn.
    Vote: Allow use of non-ASCII characters in names and titles
  • 05-04-2008 12:24 AM In reply to

    Re: Zero output voices for a submix voice?

    That's actually a scenario we did want to support.  E.g. so people could host a "sink" effect in a submix which took the input data and wrote it to a file, analyzed it in some way, sent it to a different API or over the network, etc.

    The trick is to call SetOutputVoices(NULL), not SetOutputVoices(&SendList) where SendList is empty.

    Dugan Porter [MS]
    Game Audio Team

    Dugan Porter [MS]
    Game Audio Team
  • 05-04-2008 7:51 PM In reply to

    Re: Zero output voices for a submix voice?

    I see. That's good to know. It would have been even better had MSDN mentioned that slight detail ;-)
    I appreciate your help; thanks!
    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 05-06-2008 7:38 PM In reply to

    Re: Zero output voices for a submix voice?

    You're absolutely right - I'll get our docs for this fleshed out.

    By the way, any general feedback on patchy or confusing areas in the docs (or for that matter in the API itself) is very welcome.

    Regards,
    Dugan

    Dugan Porter [MS]
    Game Audio Team
Page 1 of 1 (8 items) Previous Next