🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
4 messages
4 total messages Started by Denville Longhurst Thu, 18 Jul 2002 21:22
Using waveInStop
#956
Author: Denville Longhurst
Date: Thu, 18 Jul 2002 21:22
15 lines
1356 bytes
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.

Can anyone tell me what has changed in win2000 ??

Many thanks,

Denville.
Re: Using waveInStop
#957
Author: 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!"
Re: Using waveInStop
#958
Author: Denville Longhurst
Date: Fri, 19 Jul 2002 14:53
56 lines
3211 bytes
Thanks Corey.  Yes, I use waveInReset to clean up almost immediately but it
still has no effect.  I use such a large buffer so that I can get the
message recorded in one go without any callbacks to patch the bits together.
Works brilliantly for the last five years!  Now I have to make it work under
XP.

When I was first notified of the problem a couple of months ago I did a
search through Google and got a similar thread (still awaiting a knowlegable
reply at that stage) but I can't find it again now, but I'm not alone.

Thanks again for the reply, I guess I will have to bite the callback bullet!

Denville
Leeds, England

"Corey Murtagh" <emonk@nouce_slingshot.co.nz> wrote in message
news:3d375bd5_2@dnews...
> "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!"
>
>
Re: Using waveInStop
#960
Author: Lucian Wischik
Date: Mon, 22 Jul 2002 13:19
14 lines
1579 bytes
"Denville Longhurst" <Denville@metco.co.uk> wrote in message
news:3d382855$1_2@dnews...
> Thanks Corey.  Yes, I use waveInReset to clean up almost immediately but
it
> still has no effect.  I use such a large buffer so that I can get the
> message recorded in one go without any callbacks to patch the bits
together.

I wrote some components and demo code for using waveIn*. You could use
these, maybe? One of the example programs captures the waveIn into an
internal memory data structure with the same format as WAV -- it then uses
it to either save to disk, or play using PlaySound(). The components are at
  http://www.wischik.com/lu/programmer/
and search for "AudioIn" on that page.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads