• 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: How to handle a packet lost with AudioQueue ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to handle a packet lost with AudioQueue ?


  • Subject: Re: How to handle a packet lost with AudioQueue ?
  • From: Christian Blomert <email@hidden>
  • Date: Mon, 13 Aug 2012 14:50:23 +0200

Hey Yoann,

On Aug 13, 2012, at 8:39 AM, Yoann Gini wrote:


Like that it work, but the loss handling is done to late, so at each packet lost I add a delay in the AQ and after some time I’m totally unsynchronized with the rest of my environment…

What I need is a way to make AQ works with some packet missing… Maybe I can go a step deeper in CoreAudio, by using AU and RemoteIO… But my previous try with that wasn’t really successful… If someone have a example of RemoteIO used to play PCM frame, I’m interested.

Best regards,
Yoann

I am not really familiar with AudioQueue - could you post the code which recreates the lost packet and inserts it into the queue?
I do remember there was a 0.5second delay when starting the queue - could that be where it gets out of sync?

Either way: Once you went to AUs and RemoteIO you won't go back. Here's my current implementation to play samples of PCM (in my case 2 channel signed 16 bit Ints)
the sampleCallback is asked to render 128 - in best case - samples per run - which you could feed from the incoming stream, adding zeros to the buffer for lost packets.
The interruption handlers aren't perfect yet, so getting calls on an iphone will stop the engine ;) but other than that it should be good to go!

http://pastebin.com/qutTcPJg

if you have any questions let me know!

Best regards,
Chris


 _______________________________________________
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

References: 
 >Re: How to handle a packet lost with AudioQueue ? (From: Michael Tyson <email@hidden>)
 >Re: How to handle a packet lost with AudioQueue ? (From: Christian Blomert <email@hidden>)
 >Re: How to handle a packet lost with AudioQueue ? (From: Christian Blomert <email@hidden>)

  • Prev by Date: Re: metering mixer output on ios
  • Next by Date: Re: How to handle a packet lost with AudioQueue ?
  • Previous by thread: Re: How to handle a packet lost with AudioQueue ?
  • Next by thread: Re: How to handle a packet lost with AudioQueue ?
  • Index(es):
    • Date
    • Thread