• 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: Render callback disappearing (QT 7.0)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: User space plugin problems on Tiger
  • Next by Date: AudioFile components, the DataSource utility class and non-seekable audio sources
  • Previous by thread: Re: Render callback disappearing (QT 7.0)
  • Next by thread: dyld error: undefined references
  • Index(es):
    • Date
    • Thread