Article View: borland.public.cppbuilder.multimedia
Article #409Compressing audio - formats supported by XP
From: Mark Jacobs
Date: Wed, 21 Jul 2004 16:44
Date: Wed, 21 Jul 2004 16:44
33 lines
2389 bytes
2389 bytes
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,
--
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk
markj atty critical dotty co dotty uk
Technical Details
Message-ID:
<40fe9d52$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,3ab497c67f89962f,start X-Google-Attributes: gid10d0fc,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mark Jacobs" <markj atty critical dotty co dotty uk> From: "Mark Jacobs" <markj atty critical dotty co dotty uk> Newsgroups: borland.public.cppbuilder.multimedia Subject: Compressing audio - formats supported by XP Date: Wed, 21 Jul 2004 17:44:08 +0100 Lines: 35 Organization: DK Computing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 81.144.157.8 Message-ID: <40fe9d52$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090428242 81.144.157.8 (21 Jul 2004 09:44:02 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail