There is some stuff in DirectSound (in DirectX) to do it, thought ive never
been able to do it in real-time, there has always been a 300+ms delay
between me being able to sample the sound and being able to playback the
sound.  The catch-22 is the sooner i want to sample the sound, the more i
have to "lock" the buffers, which seems to be the whole thing causing the
delay.

DelphiX is a good place to start if you want to look at DirectX and delphi.
MS has some really good DirectX resources on their site too.  If you really
want, i could send you some ugly code too.

If anyone figures out a neat way of sampling in real-time, please let me
know.


-----Original Message-----
From: Nic Wise [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 23 September 1999 09:47
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Sampling sound


Wouldn't you want to record sound into a memory buffer then pick the
samples out that you wanted????, eg if its coming in at 8khz, and you
want 800 samples / sec, just pick up every 10th or something?????

I would imagine there is code out there to do the sampling, tho. Maybe
the SDK for winamp would be a good place to start - I think they have
the output plugins there....

Nic.


Alistair George wrote:
> 
> > does anyone have any ideas/pointers on sampling sound.  I don't want to
> > actually record sound, rather I want to get samples 100-200 times a
second
> > and then act on them immediately.
> Depends a bit on what you want to do.
> If you want the peaks I think the term is quantasize or similar. There is
a
> WAV file 'normalizer' which is freeware which works on reducing or
> increasing the overall level of the parsed WAV file for consistent
recording
> levels. I am seeking the source code for this and if thats what you are
> after let me know off the list.
> Otherwise, if you want to look at millisecond 'frames' thats another
story.
> There are several audio codes which demonstrate that as in VU meters. If
you
> need ask me and I will send to you.
> Alistair+
> 
>
---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to