🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7803

Re: How to add audio data into AVI file

#7803
From: Mark Jacobs
Date: Mon, 20 Dec 2004 16:07
38 lines
2382 bytes
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: <41c6f8cf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41c69692$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-7-bit
From: "Mark Jacobs" <http://www.jacobsm.com/mjmsg?Borland%20Newsgroup>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41c69692$1@newsgroups.borland.com>
Subject: Re: How to add audio data into AVI file
Date: Mon, 20 Dec 2004 16:07:43 -0000
Lines: 40
Organization: DK Computing
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 81.144.157.8
Message-ID: <41c6f8cf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103558863 81.144.157.8 (20 Dec 2004 08:07:43 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail