RE: Stereo panning with the HAL
RE: Stereo panning with the HAL
- Subject: RE: Stereo panning with the HAL
- From: Andrew MacDonald <email@hidden>
- Date: Wed, 7 May 2008 11:18:32 -0700
- Acceptlanguage: en-US
- Thread-topic: Stereo panning with the HAL
> From: Mikael Hakman [mailto:email@hidden]
> Sent: Wednesday, May 07, 2008 10:01
>
> If you want to implement balance then you could do that by controlling
> volume of the left and the right channel. I think this is was system does,
> but Jeff may correct me here. I also noticed that if a driver presents both
> master and separate channel volume controls, then the system will use the
> master when controlling the volume. If master control is not present then
> the system loops through channel controls and adjusts channel volume
> accordingly.
>
> When implementing balance by controlling channel volumes, you may consider
> whether you want, during balance changes, to keep overall volume constant or
> not. Probably you would also need to register for volume change
> notifications so that you could readjust volumes to the desired balance when
> the user changes the volume itself.
>
> If you by "panning" mean changing the width of stereo stage then this is
> much more difficult to do - you would need to continuously replace left and
> right signals by new computed ones.
>
> Also, when an optical jack is inserted into built-in output connector then
> all volume controls disappear and the only alternative is to intercept the
> signals and make continuous signal change yourself. This is what I do in my
> virtual volume control.
Thanks for the information. I'd discovered that I could achieve the desired effect by setting different volumes on the left and right channels. I was treating it as a "backup" solution though, because as you say, the panning is overridden when a user manually changes the volume. Assuming I can readjust properly upon receipt of a volume change notification this method should work fine.
I'm actually only interested in panning when the built-in speakers are used; the optical jack is not a concern in my case. This leads to an additional question: is there a way to detect if something is plugged into the output jack? I tried kAudioDevicePropertyJackIsConnected, but it also isn't recognized by the built-in output.
Thanks again!
Andrew
_______________________________________________
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