M
Mark Jacobs
I have been dabbling with direct handling of audio buffers, and I have been
able to open PCM and GSM6.10 formats by specifying the correct WAVEFORMATEX
and GSM610WAVEFORMAT structures. As I delved deeper, I found loads of other
compression algorithms, including MPEGLAYER3 and TRUESPEECH. The problem I am
getting is that none of these other codecs open correctly with
waveInOpen(&phwo,WAVE_MAPPER,&ptsp.wfx,(DWORD)WaveInProc,
(DWORD)this,CALLBACK_FUNCTION);
where I set up TRUESPEECHWAVEFORMAT ptsp structure as follows :-
ptsp.wfx.cbSize=32; ptsp.wfx.wFormatTag=WAVE_FORMAT_DSPGROUP_TRUESPEECH;
ptsp.wfx.nChannels=1; ptsp.wfx.nSamplesPerSec=8000;
ptsp.wfx.wBitsPerSample=0;
ptsp.wfx.nAvgBytesPerSec=1067; ptsp.wfx.nBlockAlign=32;
ptsp.nSamplesPerBlock=240;
This is in accordance with the document at
http://www.csdn.net/dev/format/windows/wavec.htm
Why will this not open for input or output? I have checked that I have all of
these codecs enabled under Windows Multimedia system properties. Am I correct
in thinking that you can only waveInOpen codecs that can handle real-time
encoding?
If I use MPEGLAYER3, I can, under Windows XP SP1, open it with waveOutOpen,
but not waveInOpen. Why only for decoding MP3 audio, and not for encoding? Is
there some kind of copyright issue here? TIA,
able to open PCM and GSM6.10 formats by specifying the correct WAVEFORMATEX
and GSM610WAVEFORMAT structures. As I delved deeper, I found loads of other
compression algorithms, including MPEGLAYER3 and TRUESPEECH. The problem I am
getting is that none of these other codecs open correctly with
waveInOpen(&phwo,WAVE_MAPPER,&ptsp.wfx,(DWORD)WaveInProc,
(DWORD)this,CALLBACK_FUNCTION);
where I set up TRUESPEECHWAVEFORMAT ptsp structure as follows :-
ptsp.wfx.cbSize=32; ptsp.wfx.wFormatTag=WAVE_FORMAT_DSPGROUP_TRUESPEECH;
ptsp.wfx.nChannels=1; ptsp.wfx.nSamplesPerSec=8000;
ptsp.wfx.wBitsPerSample=0;
ptsp.wfx.nAvgBytesPerSec=1067; ptsp.wfx.nBlockAlign=32;
ptsp.nSamplesPerBlock=240;
This is in accordance with the document at
http://www.csdn.net/dev/format/windows/wavec.htm
Why will this not open for input or output? I have checked that I have all of
these codecs enabled under Windows Multimedia system properties. Am I correct
in thinking that you can only waveInOpen codecs that can handle real-time
encoding?
If I use MPEGLAYER3, I can, under Windows XP SP1, open it with waveOutOpen,
but not waveInOpen. Why only for decoding MP3 audio, and not for encoding? Is
there some kind of copyright issue here? TIA,