Search code examples
c#audioxnaeditingcrop

Cropping audio with XNA


I'm new to XNA and am trying to allow the user to edit an audio file they've loaded in. In XNA, is it possible to select a time frame (e.g. 0:00 - 0:10) and 'crop' that part as a separate entity? I guess, essentially, it's simply copying that data to a new file. Can this be done using the XNA Audio library and, if so, what methods should I be looking at? Thank you


Solution

  • If you can wait for XNA 4, there is low level access to sound buffers, and you can crop it however you want. A google search of "C# wav file" reveals plenty of links that will show you how to manipulate the data in memory.

    Download XNA 4.0 beta here:

    http://creators.xna.com/en-US/launchcenter

    Here is a link that explains how to use the new API:

    Link