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

How to make low-level dsp effects ?

Last post 5/19/2009 6:50 PM by Shawn Hargreaves. 4 replies.
  • 5/16/2009 4:27 AM

    How to make low-level dsp effects ?


    Hi there, I'm new to the forums.  Glad to be here.

    I'm working on an audio game in XNA. 
    I'd like to be able to make and combine effects beyond just changing the volume, pitch and pan. 

    I've noticed discussion in these forums about the use of XAudio2, but I couldn't tell if they were using it within a XNA game. 
    Anyways, my question is; what are my options in having low-level control over my audio, for example, creating my own dsp effects.


  • 5/18/2009 6:26 PM In reply to

    Re: How to make low-level dsp effects ?

    The XNA Framework does not provide any low level audio APIs or DSP support.

    On Windows, you could use any other sound API you like for this (for instance you could write a C++/CLI wrapper to call directly into the native XAudio2 API).

    On Xbox, this is not possible at all.
    XNA Framework Developer - blog - homepage
  • 5/18/2009 11:13 PM In reply to

    Re: How to make low-level dsp effects ?


    Thanks, just the info I was looking for. 
  • 5/19/2009 12:00 AM In reply to

    Re: How to make low-level dsp effects ?


    Hopefully someone can answer another dsp related question:

    I created a RPC and a global variable named "MyEffect" to control it with.
    I've also associated the sound in my cue to the RPC.

    Now in my code, I'm just trying to change the values of my global variable upon a keypress. 
    But when trying to set it to 75, I keep getting an IndexOutOfRange Exception, even though "MyEffect" has a range of 0-100.



    engineSound = soundBank.GetCue("acue"); 
    engineSound.SetVariable("MyEffect",75.0f);  //this line throws the IndexOutOfRange Exception
    engineSound.Play(); 


    Any help would be appreciated. 
  • 5/19/2009 6:50 PM In reply to

    Re: How to make low-level dsp effects ?

    I suspect the problem is with the "MyEffect" string, rather than the value you are providing.

    Are you 100% sure this is the same name you specified in the XACT tool? Remember this is case-sensitive.

    Also, do you really mean a global variable? If you want to set the variable via a specific cue object, it should be a cue instance variable, not a global.
    XNA Framework Developer - blog - homepage
Page 1 of 1 (5 items) Previous Next