Hi!
thanks to Chris P., I managed to convert streams via acm* API, and now would
like to save that :)
I realize I need to use mmio to do that, and I manage to create header, but
do not know how to write data.
this is how i write my headers:
HMMIO hmmio;
hmmio = mmioOpen("C:\\dest.wav",
NULL,
MMIO_CREATE | MMIO_WRITE | MMIO_EXCLUSIVE |
MMIO_ALLOCBUF);
MMCKINFO ckRIFF;
ckRIFF.fccType = mmioFOURCC('W', 'A', 'V', 'E');
ckRIFF.cksize = 0;
mmioCreateChunk(hmmio, &ckRIFF, MMIO_CREATERIFF);
MMCKINFO ck;
ck.ckid = mmioFOURCC('f', 'm', 't', ' ');
ck.cksize = 0L;
mmioCreateChunk(hmmio, &ck, 0);
mmioWrite(hmmio, (HPSTR)&wfSrc, sizeof(wfSrc));
mmioAscend(hmmio, &ck, 0);
ck.ckid = mmioFOURCC('d', 'a', 't', 'a');
ck.cksize = dwSrcSamples;
mmioCreateChunk(hmmio, &ck, 0);
mmioAscend(hmmio, &ck, 0);
mmioAscend(hmmio, &ckRIFF, 0);
mmioClose(hmmio, 0);
I get it that my data chunk is actuall blank, but how to fill it up? ACM
fills pbDst member of ACMSTREAMHEADER with converted data, but I do not know
how to write it to data chunk.
any help much appreciated!
Replies