Re: Change Volume on Default Output Device
Re: Change Volume on Default Output Device
- Subject: Re: Change Volume on Default Output Device
- From: Doug Zwick <email@hidden>
- Date: Tue, 26 Sep 2006 12:13:04 -0600
On 26-Sep-06, at 12:00 PM, Jeff Moore wrote:
QA 1016 demonstrates manipulating a master volume control on a
device if one exists. This example is extended to the other
channels of a device by using a channel other than 0, which is
always the master channel.
Be aware that, as QA 1016 says, not every device has a master
volume control. The same is true of individual channel volume
controls. You have to be prepared to deal with them not being present.
You should check out the HALLab sample code. It puts a slider up
for each volume control it finds on a device.
On Sep 26, 2006, at 10:47 AM, Doug Zwick wrote:
I'm converting some old Sound Manager code to use Core Audio. I'm
using the DefaultOutputUnit example as the basis for the sound
output code, and am using QA 1016 as the basis for changing the
device volume setting (setting the
kAudioDevicePropertyVolumeScalar property). However, this
technique changes the master system volume. In the old Sound
Manager code, changing the volume only changed the level of the
one channel, not the entire system volume. How does one go about
doing this in Core Audio? Can I still use the default output
device (I need to be able to specify the output sample rate, and
the default output device will automatically resample to the
native device rate for me)?
Thanks, I'll give that a try. I had code to change the numerically-
larger channels if-and-only-if channel zero failed. I will rework
this code. I suspect that I have a similar issue with the master
input channel gain (the same code is used for the input gain), too,
that I hadn't found yet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden