• 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: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)


  • Subject: Re: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
  • From: Seth Willits <email@hidden>
  • Date: Thu, 15 Nov 2012 09:51:22 -0800

On Nov 15, 2012, at 6:57 AM, Daniel Kennett wrote:

> 1) This setting works in that audio is diverted to the given audio device. However, when a new default output device is chosen in the Sound pane of System Preferences, my audio gets diverted to that device. I'd like it to stay where it's told.
>
> 2) I'd also like to be able to have an option for the audio to follow the default device, as most applications behave.


In that case, I believe you want to use kAudioUnitSubType_HALOutput, not the DefaultOutput. I believe the latter always switches to the users's choice where the former does not.

To watch the device ID change, I believe you use AudioObjectAddPropertyListener. (I haven't used it myself.)


> OSStatus status = AudioHardwareServiceGetPropertyData(kAudioObjectSystemObject, &property, 0, NULL, &propertySize, &outputDeviceID);

You know, I thought this was the deprecated function, so I went and looked, and now I've learned there are three of these. In the olden days there was AudioHardwareGetProperty() which was deprecated and there's a technote which says to use  AudioObjectGetPropertyData() instead, but I see that AudioHardwareService is a whole other API added at the time the previous one was deprecated. I wonder why the difference. Anyway, yours should be fine but I use AudioObjectGetPropertyData. For the above listener I guess AudioHardwareServiceAddPropertyListener works as well. I wonder if these are just shims with call the AudioObject functions since they use the same parameters…


--
Seth Willits



 _______________________________________________
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


  • Follow-Ups:
    • Re: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
      • From: Daniel Kennett <email@hidden>
References: 
 >kAudioOutputUnitProperty_CurrentDevice not sticking (Mac) (From: Daniel Kennett <email@hidden>)

  • Prev by Date: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
  • Next by Date: CoreMIDIServer framework SDK
  • Previous by thread: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
  • Next by thread: Re: kAudioOutputUnitProperty_CurrentDevice not sticking (Mac)
  • Index(es):
    • Date
    • Thread