Re: What corresponds to kAudioDevicePropertyDeviceIsRunningSomewhere in an audio driver?
Re: What corresponds to kAudioDevicePropertyDeviceIsRunningSomewhere in an audio driver?
- Subject: Re: What corresponds to kAudioDevicePropertyDeviceIsRunningSomewhere in an audio driver?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 28 May 2003 09:42:57 -0400
- Organization: Matrox Electronic Systems Ltd.
Jeff Moore (email@hidden) wrote on Tue, 27 May 2003 11:22:00 -0700:
>
I just tried out the Daisy code in the December Developer Tools
>
release, and it all seemed to work OK for me, including loading files.
>
If Daisy doesn't display the name of the file and it's vital info, that
>
means that Daisy had trouble loading the file in question.
I found our bug. :) Our driver is based on PhantomAudioDriver; I did a
labourious diff and merge between it and ours. To make a long story
short, the bug was basically this change (made in PhantomAudioDriver):
-------------orignal-------------
void PhantomAudioEngine::timerFired(OSObject *target, IOTimerEventSource
*sender)
{
if (target) {
PhantomAudioEngine *audioEngine =
OSDynamicCast(PhantomAudioEngine, target);
if (audioEngine) {
audioEngine->currentBlock++;
if (audioEngine->currentBlock >= audioEngine->numBlocks) {
audioEngine->currentBlock = 0;
audioEngine->takeTimeStamp();
}
sender->setTimeoutUS(audioEngine->blockTimeoutUS);
}
}
}
-------------new-------------
void PhantomAudioEngine::STATIC_timerFired(OSObject *target,
IOTimerEventSource *sender)
{
if (target) {
PhantomAudioEngine *audioEngine =
OSDynamicCast(PhantomAudioEngine, target);
if (audioEngine) {
audioEngine->timerFired ();
sender->setTimeoutUS(audioEngine->blockTimeoutUS);
}
}
}
void PhantomAudioEngine::timerFired()
{
this->currentBlock++;
if (this->currentBlock >= this->numBlocks) {
this->currentBlock = 0;
this->takeTimeStamp();
}
}
-------------------
We did not realise that there is a void IOAudioEngine::timerFired(void)
and were accidentally overriding it as above. PhantomAudioDriver uses a
method named timerFired but with a different signature (!) so no problem
there (except poor taste in method names IMNSHO).
Thanks for your help Jeff,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer +1-514-822-6000
Matrox Electronic Systems Ltd. Montrial, Quibec, Canada
_______________________________________________
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.