Jump to content



Photo

Volume control.


  • Please log in to reply
28 replies to this topic

#21 asbeer450

asbeer450

    Seeker

  • Active Members
  • 5 posts

Posted 10 April 2008 - 04:15 PM

Thanks, and I agree. Is there anything that I can I do to help move this process forward, or is this something that other people need to run with from here on out?

Edited by asbeer450, 10 April 2008 - 04:16 PM.








#22 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,729 posts

Posted 10 April 2008 - 04:36 PM

Thanks, and I agree. Is there anything that I can I do to help move this process forward, or is this something that other people need to run with from here on out?

Impressive asbeer450.

I never noticed they took out the standard coding and submission practices in the Example forum for UDF submissions.

But here a link to the new one that you and or Volly can utilize to possibly get an inclusion. But there is a link to it in the first post by Gary.
http://www.autoitscript.com/forum/index.php?showtopic=62035

Edited by SmOke_N, 10 April 2008 - 04:37 PM.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.


#23 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,948 posts

Posted 10 April 2008 - 06:04 PM

Looks good. I'm in the middle of a current project, but I do think this can be put on the front burner to get this working quickly. From the looks of it, we should be able to knock this out rather quickly. It is important that we keep to the standard so that it will be included in future builds.
Do you have any means of testing on Vista? Currently I do not have access to a Vista PC, and if I remember right, Vista has a different type of audio setup so one can do per app audio control. Microsoft has released info on how to do it the old way (I think), but we need to make sure we have our ducks in a row and see if we can include the per app stuff.

#24 asbeer450

asbeer450

    Seeker

  • Active Members
  • 5 posts

Posted 11 April 2008 - 02:19 AM

Yeah, I can boot my computer into both XP and Vista, so I'll try to do some testing with Vista this weekend. I'll also work on making my code compliant with http://www.autoitscript.com/autoit3/udfs/UDF_Standards.htm.

#25 asbeer450

asbeer450

    Seeker

  • Active Members
  • 5 posts

Posted 21 April 2008 - 04:43 PM

Ok, here's what I've found out about controlling sound settings on Vista.

1. Due to changes in the way Vista handles audio controls such as volume and mute, the functions used by AutoHotkey and by my script to control volume and other settings are pretty much useless in Vista.

2. According to a comment in the following thread by Larry Osterman, a senior development engineer at Microsoft, the new per-application volume/mute controls in Vista make it impossible for one application (such as an AutoIt script) to change the volume/mute settings of another application. Thus writing sound functions for Vista doesn't seem to be an option at this time. http://forums.microsoft.com/MSDN/ShowPost....;PostID=1458398

3. According to a response by Larry Osterman to a VBScript question in the following blog, it isn't possible for a VB script to change the master volume in Vista. Thus I don't believe it would be possible for an AutoIt script to do it either. However, as this blog entry also makes clear, it is possible to do it at the C++ level, so my guess is that any AutoIt function which controls the master volume in Vista will have to be built into the AutoIt Interpreter itself. http://blogs.msdn.com/larryosterman/archiv...dows-vista.aspx


I've gone ahead and updated my SoundGetSetQuery.au3 script to conform to the UDF requirements posted above. Please feel free to look over the script and let me know if there are any additional changes that need to be made.

Also, after looking over Audio.au3 I found that it just seems to be Sound.au3 (which is already distributed with AutoIt) combined with functions for getting and setting the volume and mute controls of several different lines. Since it would probably be cleaner and more uniform to accomplish this by using wrappers for the generic SoundGet and SoundSet functions, I went ahead and created those wrappers and included them in SoundGetSetQuery.au3. As such, I'm not sure if it would still be better to combine SoundGetSetQuery.au3 with Sound.au3 or Audio.au3 before submitting it as a UDF or if it would be better to submit it as its own UDF.

Here are updated links to the scripts.

SoundGetSetQuery.au3
SoundExample.au3

#26 ycomp

ycomp

    Wayfarer

  • Active Members
  • Pip
  • 90 posts

Posted 29 April 2008 - 04:55 PM

Hi, I want to add an alarm feature to my script.. however, it will be useless for me if I cannot unmute the speaker. It seems that on Vista from reading this thread that this would not be possible?

I am muting my speaker 1/2 the time, so there is no way I will remember to unmute it each and every day.

#27 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,409 posts

Posted 29 April 2008 - 09:49 PM

Hi, I want to add an alarm feature to my script.. however, it will be useless for me if I cannot unmute the speaker. It seems that on Vista from reading this thread that this would not be possible?

I am muting my speaker 1/2 the time, so there is no way I will remember to unmute it each and every day.


Resume: Don't use Vista :D

Sorry for off-topic. I couldn't resist here.

#28 danielkza

danielkza

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 426 posts

Posted 29 April 2008 - 09:57 PM

Resume: Don't use Vista :D

Sorry for off-topic. I couldn't resist here.


Unless you have 16GB+ ram to waste,this way you can run Crysis in the low settings and benefit from your well expended hundreds of dollars.

XP FTW


#29 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,948 posts

Posted 07 May 2008 - 01:15 PM

Ok, here's what I've found out about controlling sound settings on Vista.

1. Due to changes in the way Vista handles audio controls such as volume and mute, the functions used by AutoHotkey and by my script to control volume and other settings are pretty much useless in Vista.

2. According to a comment in the following thread by Larry Osterman, a senior development engineer at Microsoft, the new per-application volume/mute controls in Vista make it impossible for one application (such as an AutoIt script) to change the volume/mute settings of another application. Thus writing sound functions for Vista doesn't seem to be an option at this time. http://forums.microsoft.com/MSDN/ShowPost....;PostID=1458398

3. According to a response by Larry Osterman to a VBScript question in the following blog, it isn't possible for a VB script to change the master volume in Vista. Thus I don't believe it would be possible for an AutoIt script to do it either. However, as this blog entry also makes clear, it is possible to do it at the C++ level, so my guess is that any AutoIt function which controls the master volume in Vista will have to be built into the AutoIt Interpreter itself. http://blogs.msdn.com/larryosterman/archiv...dows-vista.aspx


I've gone ahead and updated my SoundGetSetQuery.au3 script to conform to the UDF requirements posted above. Please feel free to look over the script and let me know if there are any additional changes that need to be made.

Also, after looking over Audio.au3 I found that it just seems to be Sound.au3 (which is already distributed with AutoIt) combined with functions for getting and setting the volume and mute controls of several different lines. Since it would probably be cleaner and more uniform to accomplish this by using wrappers for the generic SoundGet and SoundSet functions, I went ahead and created those wrappers and included them in SoundGetSetQuery.au3. As such, I'm not sure if it would still be better to combine SoundGetSetQuery.au3 with Sound.au3 or Audio.au3 before submitting it as a UDF or if it would be better to submit it as its own UDF.

Here are updated links to the scripts.

SoundGetSetQuery.au3
SoundExample.au3

In seeing the Vista problem, I'm still not clear on when one makes a application and wants to include sound control, how does one make it so just the application controls the sound? Is there some special code Vista requires, or can the current controls in SoundGetSetQuery.au3 do this? I haven't had much time as of late with the things going on at my work and at home, so if someone could answer this, that would be great.
I do think SoundGetSetQuery.au3 can replace Audio.au3. Nice work!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users