[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Code for Sampling Audio Volume Level?

David Kaye

7/25/2011 6:34:00 AM

I need something I can run every few seconds to sample the audio level
coming through the sound card. Does anybody have some simple code to do
this? Frankly I'm confused by the API calls...

Thanks!


19 Answers

Jimekus

7/26/2011 1:38:00 AM

0

On Jul 25, 6:34 pm, "David Kaye" <sfdavidka...@yahoo.com> wrote:
> I need something I can run every few seconds to sample the audio level
> coming through the sound card.  Does anybody have some simple code to do
> this?  Frankly I'm confused by the API calls...
>
> Thanks!

Download http://www.sunisoft.com/volumectrl/Volu...

David Kaye

7/26/2011 7:01:00 AM

0


"Jimekus" <jimekus@gmail.com> wrote in message
news:b2835984-d4cc-456e-886f-46ba403215b7@u6g2000prc.googlegroups.com...
On Jul 25, 6:34 pm, "David Kaye" <sfdavidka...@yahoo.com> wrote:
> I need something I can run every few seconds to sample the audio level
> coming through the sound card. Does anybody have some simple code to do
> this? Frankly I'm confused by the API calls...
>
> Thanks!

Download http://www.sunisoft.com/volumectrl/Volu...

Have you checked that website lately. I get a 404 error on it with two
different browsers.



Jimekus

7/26/2011 10:47:00 AM

0

On Jul 26, 7:01 pm, "David Kaye" <sfdavidka...@yahoo.com> wrote:
> "Jimekus" <jime...@gmail.com> wrote in message
>
> news:b2835984-d4cc-456e-886f-46ba403215b7@u6g2000prc.googlegroups.com...
> On Jul 25, 6:34 pm, "David Kaye" <sfdavidka...@yahoo.com> wrote:
>
> > I need something I can run every few seconds to sample the audio level
> > coming through the sound card. Does anybody have some simple code to do
> > this? Frankly I'm confused by the API calls...
>
> > Thanks!
>
> Downloadhttp://www.sunisoft.com/volumectrl/Volu...
>
> Have you checked that website lately.  I get a 404 error on it with two
> different browsers.

here is another link, but it doesn't work on Windows after XP. For
Vista and Win7 you beed the Windows SDK, I think.

This OCX allows you to control the volume of 7 devices (master,
wave, line in, microphone, auxiliary, synthesizer, CD) without calling
Standard Windows Volume control. Also reflects all the changes on the
devices. Was not thoroughly tested, but works.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=21206&am...

Jim Mack

7/26/2011 11:04:00 AM

0

Jimekus wrote:
> On Jul 25, 6:34 pm, "David Kaye" <sfdavidka...@yahoo.com> wrote:
>> I need something I can run every few seconds to sample the audio
>> level coming through the sound card. Does anybody have some simple
>> code to do this? Frankly I'm confused by the API calls...
>>
>> Thanks!
>
> Download http://www.sunisoft.com/volumectrl/Volu...


Sounds interesting, but...

"404 - Page Not Found"

Got a better link?

David Kaye

7/26/2011 9:01:00 PM

0

"Jimekus" <jimekus@gmail.com> wrote

> here is another link, but it doesn't work on Windows after XP. For
> Vista and Win7 you beed the Windows SDK, I think.

I don't think you understand what I'm asking for. I am looking for
something to MEASURE volume level, not to set it. Setting it is easy.

Now, on the Planet Sourcecode website, there is a piece of code that's been
spread around the net for years, a VU meter program. Fine, the code within
that is exactly what I need, but it appears that nobody has actually TESTED
it after posting it years ago because it doesn't work. It freezes three
computers I've tried it on.

Okay, I'll re-state my need: I need VB 6.0 code that will MEASURE volume
levels from my sound card and actually WORKS. There.



Jimekus

7/27/2011 12:33:00 AM

0

On Jul 27, 9:00 am, "David Kaye" <sfdavidka...@yahoo.com> wrote:
> "Jimekus" <jime...@gmail.com> wrote
>
> > here is another link, but it doesn't work on Windows after XP. For
> > Vista and Win7 you beed the Windows SDK, I think.
>
> I don't think you understand what I'm asking for.  I am looking for
> something to MEASURE volume level, not to set it.  Setting it is easy.
>
> Now, on the Planet Sourcecode website, there is a piece of code that's been
> spread around the net for years, a VU meter program.  Fine, the code within
> that is exactly what I need, but it appears that nobody has actually TESTED
> it after posting it years ago because it doesn't work.  It freezes three
> computers I've tried it on.
>
> Okay, I'll re-state my need:  I need VB 6.0 code that will MEASURE volume
> levels from my sound card and actually WORKS.  There.

In the code is this comment :-

'Call the OpenMixer function (usually mixer 0).
'Then you can get/set all the primary mixer controls with the
SetVolume, GetVolume, SetMute & GetMute functions.
'Example:
'
'OpenMixer(0)
'Slider1.Value=GetVolume(WAVEOUT)
'

Jim Mack

7/27/2011 1:16:00 AM

0

Jimekus wrote:
>
>> Okay, I'll re-state my need: I need VB 6.0 code that will MEASURE
>> volume levels from my sound card and actually WORKS. There.
>
> In the code is this comment :-
>
> 'Call the OpenMixer function (usually mixer 0).
> 'Then you can get/set all the primary mixer controls with the
> SetVolume, GetVolume, SetMute & GetMute functions.
> 'Example:
> '
> 'OpenMixer(0)
> 'Slider1.Value=GetVolume(WAVEOUT)

That looks as if it will read the volume control setting, not the
actual level of the audio itself.

--
Jim

Jimekus

7/27/2011 8:44:00 AM

0

On Jul 27, 1:16 pm, "Jim Mack" <no-uce-...@mdxi.com> wrote:
> Jimekus wrote:
>
> >> Okay, I'll re-state my need: I need VB 6.0 code that will MEASURE
> >> volume levels from my sound card and actually WORKS. There.
>
> > In the code is this comment :-
>
> > 'Call the OpenMixer function (usually mixer 0).
> > 'Then you can get/set all the primary mixer controls with the
> > SetVolume, GetVolume, SetMute & GetMute functions.
> > 'Example:
> > '
> > 'OpenMixer(0)
> > 'Slider1.Value=GetVolume(WAVEOUT)
>
> That looks as if it will read the volume control setting, not the
> actual level of the audio itself.
>
> --
>         Jim

Sorry for the misunderstanding. If you are after DSP facilities then
you could process all your streams using DirectSound or there is
Monoton written in VB6 that will do FFT, or you could use FMOD or
Windows SDK.

What are you trying to do? There are probably other ways, e.g., I used
Rapid Evolution 3 to get the harmonic keycodes of my mp3 collection.

From there, I'm trying to control the master volume in Win7 and I'd
also like to be able to record an MP3 of the DirectSound output, from
two harmonically beatmixed Winamp instances. I specifically want to
capture the mix that is going through the rear speakers while ignoring
the additional sounds coming from the front speakers.

Mike Williams

7/27/2011 10:54:00 AM

0

"Jimekus" <jimekus@gmail.com> wrote in message
news:478e5f9c-68c0-4ead-8411-9ccb7da9e347@t38g2000prj.googlegroups.com...

> . . . From there, I'm trying to control the master volume in Win7

This works:

http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=73680&am...

Mike



Norm Cook

7/27/2011 12:44:00 PM

0

Here's another that works:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=72516&am...

"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:j0oqp5$o01$1@dont-email.me...
> "Jimekus" <jimekus@gmail.com> wrote in message
> news:478e5f9c-68c0-4ead-8411-9ccb7da9e347@t38g2000prj.googlegroups.com...
>
>> . . . From there, I'm trying to control the master volume in Win7
>
> This works:
>
> http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=73680&am...
>
> Mike
>
>
>