saving audio to edited avi

Hi,

I've found a nice function that would do exactly what I want, i.e.
reading audio from an avi-file and writing into antother file
:
http://www.itlisting.org/3-windows-xp/a6ead23d8e938c70.aspx

however, I don't know how to provide the necessary parameters in the correct way. My attempt was:

PAVIFILE avinew;
PAVIFILE avi3;
PAVISTREAM pStream;
sprintf_s(load,"%soriginal.avi",samp.c_str());
AVIFileInit();
AVIFileOpen(&avi3, load, OF_READ, NULL);
AVIFileGetStream(avi3, &pStream,streamtypeAUDIO, 0);
sprintf_s(avi,"%sedited.avi",samp.c_str());
AVIFileInit();
AVIFileOpen(&avinew, avi, OF_READ, NULL);
SaveAudio(pStream,avinew);AVIFileExit();

where original.avi is the source avi and edited.avi the edited source avi. What am I doing wrong here or how do I do it?

Hope someone knows how to and can provide the lines necessary to make it work :-)
Topic archived. No new replies allowed.