• 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: AudioDevice, sleep time after device stream changed is in need?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioDevice, sleep time after device stream changed is in need?


  • Subject: Re: AudioDevice, sleep time after device stream changed is in need?
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 10 Jul 2003 11:37:56 -0700

I wouldn't try to make the HAL's asynchronous nature be synchronous. This just slows down your app and makes it less responsive, especially since the operation in question might take a long time to complete (especially true when changing the stream format of some devices). Instead, you should leverage the notifications from the HAL to drive you app's actions. It's the same concept as using the user's UI gestures or AppleScript to drive your app's actions. Doing things this way also allows you to properly handle changes in the device's state when they come from outside sources, such as other processes or from the device itself.

The way I handle this in my own GUI apps when the user manipulates a control is to just set the property value in the HAL and then immediately update the GUI with the current value again so that the GUI is still in synch with the device. Then when the HAL calls my listener proc, I update the GUI again with the new value or do any other work that I need to do such as reconfiguring an AudioConverter or whatever. You do a little bit more work, but in the long run, the GUI is much more responsive and stays in synch with the hardware a lot better.

On Wednesday, July 9, 2003, at 6:49 PM, Nobuyasu Jinnai/神内伸恭 wrote:

Dear Jeff

Thank you for your suggestion.

From: Jeff Moore <email@hidden>
Subject: Re: AudioDevice, sleep time after device stream changed is in need?
Date: Wed, 9 Jul 2003 11:54:20 -0700

The HAL is, for the most part, an asynchronous API. The length of time

But then we have to join (or wait) the thread had complete.
Do I misunderstand?
Please tell me any ideas.

Best regards,

--Jinnai
_______________________________________________
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.



--

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: 
 >AudioDevice, sleep time after device stream changed is in need? (From: Nobuyasu Jinnai/神内伸恭 <email@hidden>)
 >Re: AudioDevice, sleep time after device stream changed is in need? (From: Jeff Moore <email@hidden>)
 >Re: AudioDevice, sleep time after device stream changed is in need? (From: Nobuyasu Jinnai/神内伸恭 <email@hidden>)

  • Prev by Date: Re: AudioHardwareGetProperty problem; THANKS!
  • Next by Date: AUMIDIController Virtual Destination
  • Previous by thread: Re: AudioDevice, sleep time after device stream changed is in need?
  • Next by thread: AudioHardwareGetProperty problem
  • Index(es):
    • Date
    • Thread