WxW
asked on
WAV Compression
I used this call to open a MM handle for sample recording
WAVEFORMATEX wINEX;
WAVEIN wIN;
wINEX.wFormatTag = WAVE_FORMAT_PCM;
wINEX.nChannels = 2;
wINEX.nSamplesPerSec = 16000;
wINEX.wBitsPerSample = 8; // 8,16
wINEX.nBlockAlign = (wINEX.wBitsPerSample * wINEX.nChannels) / 8;
wINEX.nAvgBytesPerSec = wINEX.nSamplesPerSec * wINEX.nBlockAlign;
wINEX.cbSize = 0;
f = waveInOpen(
&wIN,
WAVE_MAPPER,
&wINEX,
(unsigned long)waveInProc,
0,
CALLBACK_FUNCTION);
I decided to use ADPCM for a better compression , but if I select WAVE_FORMAT_ADPCM to wFormatTag , the waveInOpen returns an error code : 32 . What's happening ?
And of course , if you have a suggestion for a better compression , tell me .
Thanks
WAVEFORMATEX wINEX;
WAVEIN wIN;
wINEX.wFormatTag = WAVE_FORMAT_PCM;
wINEX.nChannels = 2;
wINEX.nSamplesPerSec = 16000;
wINEX.wBitsPerSample = 8; // 8,16
wINEX.nBlockAlign = (wINEX.wBitsPerSample * wINEX.nChannels) / 8;
wINEX.nAvgBytesPerSec = wINEX.nSamplesPerSec * wINEX.nBlockAlign;
wINEX.cbSize = 0;
f = waveInOpen(
&wIN,
WAVE_MAPPER,
&wINEX,
(unsigned long)waveInProc,
0,
CALLBACK_FUNCTION);
I decided to use ADPCM for a better compression , but if I select WAVE_FORMAT_ADPCM to wFormatTag , the waveInOpen returns an error code : 32 . What's happening ?
And of course , if you have a suggestion for a better compression , tell me .
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can find the specification in MSDN Library on MSDN CDs or online (http://www.microsoft.com/msdn).
Microsoft Developer Network\Tools and Technologies\Multimedia Standards Update\New Multimedia\Document\Data Types and Data Techniques\New WAVE Types
Microsoft Developer Network\Tools and Technologies\Multimedia Standards Update\New Multimedia\Document\Data Types and Data Techniques\New WAVE Types
ASKER