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

Managed XAudio2 - Do you want it?

Last post 07-03-2008 12:12 PM by TriangleIL. 20 replies.
  • 04-03-2008 7:26 PM

    Managed XAudio2 - Do you want it?

    Hi guys (and gals),

    I'm getting close to releasing a beta release of Managed XAudio2 for Windows; allowing any .NET language access to the XAudio2 COM interfaces and their respective methods. What I would like to know is 'Who would be interested?', 'You?'. Obviously it can be used as an alternative to XACT within XNA Game Studio. In fact because it's a .NET assembly it is accessible through any .NET language and therefore implementable in Windows applications, etc. I don't believe it will work on the XBox 360 and as I do not have access to one I can't guarantee it's functionality but future versions will be targeted at both platforms.

    I am aware that XACT3 uses XAudio2 and I'm not a fan of XACT. I have heard many arguments for and against it so I am also simultaneously writing an editor tool but thats going to be a few months away at least.

    I eagerly await your replies...

    The Lumnious Aardvark
  • 04-03-2008 7:28 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    The Luminous Aardvark:
    I don't believe it will work on the XBox 360 and as I do not have access to one I can't guarantee it's functionality but future versions will be targeted at both platforms.

    If there's any COM or native interop it won't work on the Xbox 360. You have to be 100% managed on Xbox.

    I would be all about testing things, but my audio needs are simple. I don't even know what I'd gain from using this over XACT.

    NickGravelyn -- Microsoft XNA MVP
    Blog | XNA wiki | My Projects
    Write an Article, Win a Zune!
  • 04-04-2008 1:14 AM In reply to

    Re: Managed XAudio2 - Do you want it?

    XAudio2 has better multi-channel audio support, better compression support (WMA anyone?) and better DSP, among other things.
    However, on Windows, what would a managed wrapper give you that COM interop doesn't?
    And on Xbox, we have to wait for XACT 3 support, which supports XAudio 2. We're hoping XNA GS will dare to upgrade to XACT 3 by 3.0, but they have been mum on specifics so far.

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

    Re: Managed XAudio2 - Do you want it?

    Ok fair points made by both of you but take the following for example:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    void InitializeAudioEngine()
    {
    // Create the manager
      _xAudio2Manager = gcnew XAudio2Manager();

    // Use default Engine Settings
      EngineSettings^ es = gcnew EngineSettings();
      _xAudio2Manager->CreateDevice(es);

    // Load wave
      WaveDataContainer^ wdc = _xAudio2Manager->LoadWave("foobar.wav");

    // Create Source Voice from WAVEFORMATEX of wdc
      XAudio2SourceVoice^ source = _xAudio2Manager->CreateSourceVoice(wdc);

    // play the source
    source->Play();
    }

    I appreciate it's using C++ and I'm not demonstrating error trapping, cleanup, etc. but how many lines of code would it take (as in the XAudio2BasicSound example)? There is far more to it than this too.

    If you or anyone else believe that there is truly no need for this then please let me know as I could be doing something else. Perhaps more useful too!

    :)
  • 04-04-2008 3:32 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    The problem is that managed development of games almost only makes sense when you want to target the Xbox. Else you might as well develop in the native C++, that all the SDK and examples support. And when targeting the Xbox, an XAudio2 wrapper will not work; we'll have to wait for GSE 3 and hope they support XACT 3. At least, that's my opinion -- others may have different opinions.
    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-04-2008 4:23 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    Thanks for your input.

    Could you or someone explain to me, why a managed wrapper won't work on the Xbox or direct me to the information please. Does the Xbox not have the XAudio2 dll?

    Thanks again.
  • 04-05-2008 12:33 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    The only managed DLLs on the Xbox are the DLLs provided by XNA Game Studio Express. Any other Xbox development has to be done with the XDK, which is only available under NDA with Microsoft. And to get to sign that NDA, you pretty much need to have relations with some publisher that is already working on Xbox games.
    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-08-2008 11:14 AM In reply to

    Re: Managed XAudio2 - Do you want it?

    I hope that XNA Game Studio 3.0 would come with some support for XAudio2...but till then....
    It would be REALLY nice to have a managed wrapper of XAudio2!
    Good idea dude, I'm interested!
  • 04-08-2008 5:44 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    Well as I'm sure you are aware XACT3 utilises XAudio2 so you can expect it to be there with GSE 3.0. I'll be making the Managed XAudio2 available shortly and will post a message on the forum accordingly.

    See following post.
  • 04-08-2008 5:51 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    The Luminous Aardvark:
    Well as I'm sure you are aware XACT3 utilises XAudio2 so It'll be there with GSE 3.0.


    That has neither been confirmed nor denied. While it is logical and likely that they will support XACT3, there is no confirmation from the XNA team that it will be used for XNA GS 3.0.

    NickGravelyn -- Microsoft XNA MVP
    Blog | XNA wiki | My Projects
    Write an Article, Win a Zune!
  • 04-10-2008 5:33 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    I stand corrected.
  • 04-10-2008 5:35 PM In reply to

    Re: Managed XAudio2 - Do you want it?

    The Luminous Aardvark:
    I stand corrected.


    It's not a big deal, but I want to make sure others reading the forums in the future know that this isn't a confirmed feature yet. It's important to distinguish between speculation/assumptions and confirmed features.

    NickGravelyn -- Microsoft XNA MVP
    Blog | XNA wiki | My Projects
    Write an Article, Win a Zune!
  • 04-10-2008 5:43 PM In reply to

    Re: Managed XAudio2 - Do you want it?