• 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
Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime


  • Subject: Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime
  • From: Recy Pilloud <email@hidden>
  • Date: Mon, 1 Dec 2008 17:33:49 -0700

We have an application where we are capturing system output with our proprietary device, processing it, then sending it to a system output device (built-in, headphones, USB, etc.).

When our application initializes, we programmatically switch the default output device to our device (so all system output gets directed to our device) with the following call:

err = AudioHardwareSetProperty(kAudioHardwarePropertyDefaultOutputDevice, sizeof(Uint32), &inputDevice);

We are using CAPlayThrough to stream the data from our device (the input) to the system output device (the output).

After we programmatically switch the default output device, the system appears to stop the device that was previously selected (e.g. built-in speakers, which is the device we send output to). This causes subsequent calls in CAPlaythrough to AudioDeviceGetCurrentTime to get the time from the system output device to fail.

If we change system output device (e.g. plug or unplug headphones), the problem corrects itself.

We are only seeing this problem on the Tiger OS (10.4.11). We do not see the problem at all on Leopard.

We have verified the problem occurs in the CAPlayThrough example code on Tiger as well by adding the call to programmatically switch the device in the CAPlayThroughController's awakeFromNib method.

Is there something different we should be doing on Tiger systems to avoid this problem? Is this a bug in CoreAudio?

Thanks.

Recy
_______________________________________________
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: Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: coreaudio usb driver
  • Next by Date: Re: Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime
  • Previous by thread: Re: coreaudio usb driver
  • Next by thread: Re: Switching Device Programmatically and Subsequent call to AudioDeviceGetCurrentTime
  • Index(es):
    • Date
    • Thread