• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing the system volume?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the system volume?


  • Subject: Re: Changing the system volume?
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 4 Jun 2003 11:46:27 -0700

You are best of using the volume properties of an audio device as found in the HAL. The sample app, Daisy, in /Developer/Examples/CoreAudio/HAL has code for doing it.

That said, you will really want to bone up a bit about how audio devices are implemented on the system. The IOAudio family and the HAL present devices to the system as they really are. This means that not all devices have volume controls any more and the ones that do do not necessarily provide their gain stages in the same locations. Again, Daisy will help you visualize what's going on.

On Wednesday, June 4, 2003, at 09:24 AM, Eric Shapiro wrote:

Is there a snippet of code somewhere on how to change the system volume?

I've been searching Apple's web site, usenet, and the core audio list archives, but the only clues I see are that either "IOAudioLevelControl::CreateVolumeControl()" or "SoundComponentSetInfo(siHardwareVolume)" might be the right approach. But no further documentation on the subject.

I need control the audio volume in MacOS X 10.2 from a C/C++ user-level Carbon/Mach-O application that will run with no real user input. The program needs to be able to unmute the built-in speaker and change the volume as needed. In the old MacOS days, there was a low memory global to control the volume and later some system calls, but neither of those work on MacOS X.

Thanks,
Eric Shapiro

--

Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Changing the system volume? (From: Eric Shapiro <email@hidden>)

  • Prev by Date: Re: Convert to float and more
  • Next by Date: Re: Convert to float and more
  • Previous by thread: Changing the system volume?
  • Next by thread: Re: Changing the system volume?
  • Index(es):
    • Date
    • Thread