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

Slowing Down Sounds in XNA

Last post 08-31-2008 2:34 AM by jwatte. 4 replies.
  • 08-22-2008 4:37 AM

    Slowing Down Sounds in XNA

    I'm trying to slow down and speed up sounds in my game in real time while the game is running.  It looks like this can't be done in XACT within the XNA framework, but it may be possible in XAudio2.

    Is it possible to do the slow down effect with XACT/XNA?  Alternatively, can code written in C++ using XAudio2 be linked into a C# XNA studio game?

  • 08-22-2008 7:28 AM In reply to

    Re: Slowing Down Sounds in XNA

    bluetown:
    I'm trying to slow down and speed up sounds in my game in real time while the game is running.  It looks like this can't be done in XACT within the XNA framework
    It is possible, but what you are looking for is the pitch, not "speed".

    Check this thread 


    epsicode.net Little Gamers: Teh Game
  • 08-22-2008 8:24 AM In reply to

    Re: Slowing Down Sounds in XNA

    No, I'm looking for speed, or playing a song at a different sample rate than it was recorded.  For example, slowing a 100bpm loop to 50bpm.  DJ equipment often does this to sync different tempo'd songs.  I am interested in knowing if this can be done with XNA or XAudio2.

    A side effect of slowing a sound down without compensating is that the sound's pitch will get lower, and vice versa for higher, but that's a different issue. 

  • 08-31-2008 1:27 AM In reply to

    Re: Slowing Down Sounds in XNA

    If you're looking for beat-matching and/or pitch invarient time stretching of audio then that is not supported in XAudio2 or XNA.  
    - Ashu Tatake
    XNA Framework Developer
  • 08-31-2008 2:34 AM In reply to

    Re: Slowing Down Sounds in XNA

    With XACT, you can pitch bend a sound such that it plays slower or faster, and bends in pitch. You can also do this with XAudio2.

    Neither XACT or XAudio2 have built-in code to do pitch invariant time stretching. However, if you had access to XAudio2, you could implement some form of time stretching in C# yourself, and feed the stretched audio to XAudio2, but with XACT under XNA, you cannot push your own sound buffers at the mixer, so there's no way of getting there.


    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
Page 1 of 1 (5 items) Previous Next