Article View: borland.public.cppbuilder.nativeapi
Article #7818Re: How to add audio data into AVI file
From: sky
Date: Tue, 21 Dec 2004 09:00
Date: Tue, 21 Dec 2004 09:00
60 lines
2816 bytes
2816 bytes
Dear Mark
Thank you for your answer,
I have succeeded in recording with MCI command,
now I want to learn how to use waveIn...
could you give me any hint or a sample(record in AVI)?
many thanks in advanced
sky
"Mark Jacobs" <http://www.jacobsm.com/mjmsg?Borland%20Newsgroup> д���ʼ�
news:41c6f8cf$1@newsgroups.borland.com...
> Have a look at MCI command strings reference and this helper function :-
>
> bool mjdomcicmd(AnsiString cmd,bool shwres,AnsiString cmp)
> {
> char erst[9999]; erst[0]='\0';
> int mcierr=mciSendString(cmd.c_str(),erst,9990,NULL);
> if (mcierr!=0) { mciGetErrorString(mcierr,erst,9990);
> ShowMessage(AnsiString(erst)); return false;}
> else if (erst[0] && !cmp.IsEmpty()) return
> (AnsiString(erst).LowerCase()==cmp.LowerCase());
> else if (erst[0] && shwres) ShowMessage(AnsiString(erst));
> return true;
> }
>
> and use for example is :-
>
> mjdomcicmd("open new type waveaudio alias phsnd wait",false,"");
>
> MCI is easier to handle than waveIn etcetera, especially when it comes to
> video mixing. Have a look at the "setaudio" MCI command to see what I mean
by
> easier.
> --
> Mark Jacobs
> DK Computing
> http://www.dkcomputing.co.uk
>
> "sky" <huangc@motic.com> wrote in message
> news:41c69692$1@newsgroups.borland.com...
> | I need capture my digital-camera data into a AVI file, the push mode was
> | used for adding camera frame into video stream one by one, it works
great.
> | But now I want to add audio information into this AVI file at the same
time
> | three question:
> | 1. how to set the information for audio stream, for example dwScale,
dwRate
> | etc.
> | 2. Can I use the waveIn... functions get audio data and write it into
audio
> | stream directly(WM_WIM_DATA)
> | 3. how to make the audio data and video data written into the
corresponding
> | stream synshronously.
>
>
Technical Details
Message-ID:
<41c7e618@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41c69692$1@newsgroups.borland.com> <41c6f8cf$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,867ccc9a7269ac57 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII Reply-To: "sky" <huangc@motic.com> From: "sky" <huangc@motic.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <41c69692$1@newsgroups.borland.com> <41c6f8cf$1@newsgroups.borland.com> Subject: Re: How to add audio data into AVI file Date: Tue, 21 Dec 2004 17:00:04 +0800 Lines: 62 Organization: motic 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: 218.85.121.51 Message-ID: <41c7e618@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103619608 218.85.121.51 (21 Dec 2004 01:00:08 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail