🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #957

Re: Using waveInStop

#957
From: Corey Murtagh
Date: Fri, 19 Jul 2002 00:22
35 lines
2369 bytes
"Denville Longhurst" <Denville@metco.co.uk> wrote in message
news:3d373204_1@dnews...
> Hi
>
> I have an application which records from a microphone input; it works
> fine under NT.  It has a Stop button which calls waveInStop when the
> recording is complete.
>
> Running the app under w2k or XP I find that the waveInStop doesn't
> function any more - the recording simply continues until the buffer
> is full, which is several minutes.

You have several minutes worth of buffer?  Wow.  I think the longest buffer
I ever used with the waveIn* APIs was about a second.  I haven't used them
under Win2K/XP as yet though.

Anyway, try doing a waveInReset after the stop.  From the API docs:

"The waveInReset function stops input on the given waveform-audio input
device and resets the current position to zero. All pending buffers are
marked as done and returned to the application."

This seems to say that the current buffer will be reset, which would be a
bad thing.  It's worth trying however, and you should always reset the
waveIn and waveOut devices after you're finished with them.

There are no notes in the documentation for either waveInReset or waveInStop
that indicate that there is anything different in Win2K/XP.  I wouldn't be
surprised if there was however... M$ are prone to omissions like that in
their docs.

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"
Technical Details
Message-ID: <3d375bd5_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3d373204_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,bd9611909e182eb6
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2002-07-18 17:53:02 PST
From: "Corey Murtagh" <emonk@nouce_slingshot.co.nz>
Newsgroups: borland.public.cppbuilder.multimedia
References: <3d373204_1@dnews>
Subject: Re: Using waveInStop
Date: Fri, 19 Jul 2002 12:22:51 +1200
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 202.180.96.189
Message-ID: <3d375bd5_2@dnews>
X-Trace: dnews 1027038165 202.180.96.189 (18 Jul 2002 17:22:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews