Re: Render callback disappearing (QT 7.0)
Re: Render callback disappearing (QT 7.0)
- Subject: Re: Render callback disappearing (QT 7.0)
- From: Dominic Feira <email@hidden>
- Date: Thu, 12 May 2005 13:30:52 -0400
With some help from William Stewart the problem was identified and
fixed. I just wanted to post the reason/fix so its in the archives
in case somebody else has the same problem.
Basically, I wasn't handling the timestamp properly. The corrrect
way to manually pump data is listed below. I was simply passing in
an uninitialized timestamp and not incrementing mSampleTime. Oops.
AudioTimeStamp stamp;
memset(&stamp, 0, sizeof(stamp)); /* crucial or you get
garbage */
stamp.mFlags = kAudioTimeStampSampleTimeValid; /* crucial */
while(true)
{
frames = 512;
AudioUnitRender(mOutputUnit,
&flags,
&stamp,
0,
frames,
mBufferList);
stamp.mSampleTime += frames; /* crucial */
}
Thanks to all who gave ideas and feedback.
Dominic Feira / Code Monkey / Ambrosia Software, Inc.
_______________________________________________
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