Link to home
Start Free TrialLog in
Avatar of roosiedb
roosiedb

asked on

auxGetVolume

Why does this procedure not work ???

unit VolUnit1;
uses ......., mmsystem;
...
var
    Device:       Byte;
    VolumeTotaal: Cardinal;
    VolumeLeft:   Word;
    VolumeRight:  Word;
...
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Device:=2;
  auxGetVolume(Device,@VolumeTotaal);
  VolumeLeft := VolumeTotaal and $0000ffff;
  VolumeRight:= VolumeTotaal shr 16;
  Label1.Caption:=FloatToStr(VolumeTotaal);
  Label2.Caption:=FloatToStr(VolumeLeft);
  Label3.Caption:=FloatToStr(VolumeRight);
end;
...

HELP me PLEASE !!!!!
Thanx.
Stefan van Roosmalen.
Avatar of Stuart_Johnson
Stuart_Johnson

Let me guess, you aren't using a Genuine SoundBlaster card are you?  We are trying to do the same thing here with an ESS Audio Drive card and it wont work - but it does perfectly on a Creative Labs card.

I just tested you code on my SB Vibra 16 P&P card and it worked perfectly.  However, when I ran it on the ESS Audio Drive 1689 P&P card, I just got the same number no matter what I set the volume levels too.

I would be interested to know if you can solve this or not.  We have had the guys from NEC trying to solve it for us, and we are in the middle of contacting ESS now.

If I find anything, rest assured, I will let you know.

Regards,

Stuart.
Avatar of roosiedb

ASKER

Adjusted points to 125
Roosiedb:

So, are you using a non Sound Blaster compatible card???  I'ld just be interested to know if my comments where useful or not.

Stu.
Well, I don't exactly know the name of my soundcard, but it is definitely not a SoundBlaster-card. I really do not know how to solve this problem and I want to ask everyone who can, to solve it so that my solution to this problem also works on the other soundcards, like for example: CreativeLabs. Otherwise my application won't work at computers with other soundcards than mine. When you found something what maybe can help me, please tell me. But I don't want to use new components, because I allready tried several components, and they seem only to work with SB-cards too. Bye!
ASKER CERTIFIED SOLUTION
Avatar of BoRiS
BoRiS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Boris,

Your function seems to work great, but I also want to know how I can get the volume-values of the other mixer-channels (Master and Microphone). Would you please tell me how to adjust the code you sent me so that I can finish my (audio)job.
Thanx !!

Stefan van Roosmalen.
roosiedb

The master volume I'm still working on but the microphone volume I have set up

Please grad this answer and send me your mail address then I'll send you the component I wrote that gets and sets all the volumes except for now the master volume which is what I'm busy with...

Later
BoRiS
My e-mail adres is:
roosiedb@wxs.nl
Please send me the MICROPHONE and MASTER -stuff too ...
Thanx again. It is worth 250 points !!! Excellent !!!
roosiedb

K I'll send you the component as sson as I get the master volume done..

I have added you to my contacts list so I'll mail you the component soon

till then

Later
BoRiS
Boris, Can I have you e-mail to contact you in the future for this kind of things?
Bye! Stefan.
roosiedb

my email at work is pdutoit@brillacc.com
and at home is idbehold@iafrica.com

keep in touch

Later
BoRiS
(Phillip)