Re: Beep ( frequency, duration)
Re: Beep ( frequency, duration)
- Subject: Re: Beep ( frequency, duration)
- From: Jens Alfke <email@hidden>
- Date: Mon, 29 Dec 2014 10:52:07 -0800
> On Dec 29, 2014, at 2:12 AM, Michael Crawford <email@hidden> wrote:
>
> While this source runs in userspace,
> and it supplies data from userspace, the requests for samples seem to
> be coming from a hardware interrupt task.
It's not quite that low-level! It's a thread, but a super-high-priority (real-time) one managed by CoreAudio's hardware abstraction layer (HAL). Which you should _not_ ever block, or system audio will get screwed up. (That's one of the difficulties doing audio at that level — you can't call any I/O from that callback, so you have to run another thread to read the audio data from a file/socket/whatever and queue it. Thank god we have AVFoundation now to do that kind of stuff.)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden