Re: Question about Hog Mode
Re: Question about Hog Mode
- Subject: Re: Question about Hog Mode
- From: "Stephen F. Booth" <email@hidden>
- Date: Mon, 11 Jan 2010 21:59:57 -0800
Just for posterity:
>>> I'm less sure about what AUHAL does in this circumstance. But, I'm pretty sure that AUHAL will not restart IO when this happens without your intervention. As to what may be still calling your input callback and render notifications, I can't really say other than they aren't being driven by the HAL at that point.
You're right, it seems AUHAL does not restart IO after hog mode is taken.
>> So my next question is: what is the best way to restart IO at this
>> point? Get the AudioDeviceID from the output unit and call
>> AudioDeviceStart() with a NULL IOProc? Would I need to do something
>> with my AUGraph to ensure continuity?
> You should probably do it this way:
> 1) Stop IO. It's going to stop anyway, might as well be explicit about it.
> 2) Take hog mode.
> 3) Start IO.
>
> This is the best way to ensure that things happen in the right order for everybody involved.
For the record, I was unable to get this working by setting
kAudioOutputUnitProperty_EnableIO to 0 on my AUGraph's output unit.
But if I use AUGraphStart and Stop it works, so although puzzled I'm
not too worried.
>> As for the notifications, perhaps it is AUGraph's internal machinery
>> that is still processing. The call stack looks normal:
>>
>> #0 0x10000c9f4 in AudioPlayer::DidRender at AudioPlayer.cpp:1655
>> #1 0x10000b4bd in auGraphDidRender at AudioPlayer.cpp:150
>> #2 0x7fff8439c4fb in AudioUnitGraph::HandleRenderNotify
>> #3 0x7fff8439c559 in AudioUnitGraph::GraphRenderCallback
>> #4 0x10061f8cc in dyld_stub_realloc
>> #5 0x100624fe7 in AUGenericOutputEntry
>> #6 0x7fff83cd986d in HP_IOProc::Call
>> #7 0x7fff83cd963f in IOA_Device::CallIOProcs
>> #8 0x7fff83cd9475 in HP_IOThread::PerformIO
>> #9 0x7fff83cd7484 in HP_IOThread::WorkLoop
>> #10 0x7fff83cd6d57 in HP_IOThread::ThreadEntry
>> #11 0x7fff83cd6c85 in CAPThread::Entry
>> #12 0x7fff83482f8e in _pthread_start
>> #13 0x7fff83482e41 in thread_start
>
> Actually, this is ultimately rooted in the HAL's IO thread which implies that IO is running at the point where you grabbed this back trace.
Again you're right- it turns out I was mistakenly using the
DefaultOutput AU instead of the more generic HALOutput AU. So, as soon
as hog mode was acquired the default device changed from my on-board
audio to SoundFlower. So IO was still running at this point, but not
on the device I thought it was!
Stephen
_______________________________________________
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