Saving Parts of WAV file

I was referred to this forum by KingTut. I'm writing a recording/playback system for the PC that will work with many services (currently, XM) to display song and artist info in sync. I'd like to know how to save out part of a WAV file. I'm using the MMControl, but any method would be fine. The program is in VB, but I can write a C or C++ DLL if needed. I've found some complicated code for loading and saving WAV files byte by byte, but was hoping (as always) for a shortcut.

I'm the author of TodayPlayer for the PPC (both tiny window and big buttons), and hope to be able to do playback with artist/song info there as well.

Oh yeah, like TodayPlayer, the software wil be free. (TodayPlayer is GPL.)

Sorry about not being clear. My program uses the Windows media control to record long WAVs (e.g. overnight) while logging what it is recording (artist/song.) I also have a player that plays the WAV while displaying the list of songs. You can click on a song to play it. I want to be able to save off that song, which means extracting and saving a 3-minute segment from an 8-hour WAV.

I was hoping the Windows multimedia control, or API, allowed this, but it looks like it can only save out the whole file. It does indeed look like I will have to access the data "raw", and "create a new wave header." Not a big deal, but I'd hate to do that and then find out it was already supported.

I will take a look at audiostudio; thanx! However, if it is GPL, I'd prefer to stay away. My TodayPlayer is GPL, and that has turned out to be more of a pain than it is worth. I'd rather just put up my source code without all that red tape.

If you owner of the code, you can change its license any time. Don't see much problem here.
Creating sound files is simpler than you think. No need to use 'smart' DLLs or controls. Just see my tutorial http://pymedia.org/tut

My question to you is: Does your recording app know when a new song is playing ??

Yes, it does, plus or minus a few seconds.

If you owner of the code, you can change its license any time.

I made the mistake of using code from another GPL'ed program (in fact, one that did not mention it.) Even if I wrote my own now, I couldn't help but use what I learned from the other code. In the grand scheme of things, it's no big deal, but now with that program, it's more of a pain to do a "release" version.

just get the program goldwave *cough* download *cough* its the best audio editing tool

I currently use Cool Edit Pro; I was one of the first to buy it shareware. There is also Audigy, which is freeware (although buggy with large files.) I just want to automate the process.

Oddly enough, if I knew the artist/song of some of the material I've recorded over the past 35 years, I'd have purchased many more CDs.