• 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: Audio glitches during playback thru Remote IO unit (iPhone)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio glitches during playback thru Remote IO unit (iPhone)


  • Subject: Re: Audio glitches during playback thru Remote IO unit (iPhone)
  • From: "Zhiye (Sterling) Li" <email@hidden>
  • Date: Wed, 12 Aug 2009 09:59:17 -0500

Hi Tahome,

Thanks for your reply. I made a NSThread method where I use the AudioFileReadPackets() to read data to a double buffered queue, and now in the playback callback function it only calls the thread method when the buffer needs to be updated.

It's my thread method:

// File Reader thread
-(void)readData  {
   
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   
   // Double buffer stuff.
   
   // Read file.
    AudioFileReadPackets ( )

    [pool release];
}

However, it didn't sound much better. I've also changed the thread priority number for both the render thread and the file reader thread that I made, it happened that the results were a little bit different, but it's just the matter of more glitches or less. So maybe there is a better way to do the file reader thread? Do you or anyone have any reader thread example that I can learn from?

Thanks!

Zhiye







On Wed, Aug 12, 2009 at 2:02 AM, tahome izwah <email@hidden> wrote:
I think it is discouraged to do synchronous reads within a render
callback. You should have a separate reader thread and queue up your
audio buffers in memory until they are needed for playback.

--th
 _______________________________________________
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 sterling.li@gmail.com

 _______________________________________________
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

  • Follow-Ups:
    • Re: Audio glitches during playback thru Remote IO unit (iPhone)
      • From: Steven Winston <email@hidden>
References: 
 >Audio glitches during playback thru Remote IO unit (iPhone) (From: "Zhiye (Sterling) Li" <email@hidden>)
 >Re: Audio glitches during playback thru Remote IO unit (iPhone) (From: tahome izwah <email@hidden>)

  • Prev by Date: Bank or single preset in AU SaveState?
  • Next by Date: Re: audio processing iphone
  • Previous by thread: Re: Audio glitches during playback thru Remote IO unit (iPhone)
  • Next by thread: Re: Audio glitches during playback thru Remote IO unit (iPhone)
  • Index(es):
    • Date
    • Thread