windows - is there anyway to trim audio files - implementing a library

I am after a way to trim audio files on windows and save them to file. I can do this on mac easy enough with AVFoundation tools by MBS.
I know that the sox library can trim files. I also know that it may be possible with VLC.
I also saw that there is a trim function in the windows WPI.

Any clues?

Here’s my suggestion: Get yourself familiar with the WAVE and AIFF file formats. it’s rather easy to write some functions that:

-Read the file into a memory buffer
-Locate the data chunk and extract it out
-Get the channel and bitrate info so you can trim appropriately
-Trim it
-Put it back into the buffer
-Adjust the chunk sizes and perhaps loop points, other
-Write the buffer back into the file

(If you are dealing with MP3 or FLAC or OGG, you have the additional work to convert the data out, work with it, then convert it back in.)

The reason I suggest it is because 1) it’s really easy and 2) if you want to trim files, you also want to do other things with audio, and you are past trying to rely on some (probably free) code library that you have no control of anyway. I’ve always wanted to write a REAL/Xojo class that would do this and give it away but I keep putting it off. I already have the functions and they are REALLY good but extracting them from my framework would take a little time.

I suggest you roll your own here, if you need any help, email me at garth AT chickensys.com.