AirPlay / AirTunes audio stuttering on 0.26

Description

I am having a problem with audio stuttering when sending AirTunes? to a frontend. I was using shairport (and still can) without issue. Whenever I send a stream to the frontend, I get what looks like a lot of missed packet errors in the log. I don't have this issue with shairport and just some quick testing of YouTube? videos from an iOS device results in perfect video/audio streaming!

I've been experiencing the same problem since I recently updated my mythtv to the latest 0.26-fixes revision: lots of stuttering when streaming audio from an iOS client (Spotify) to myth over AirPlay? while mythfrontend write the same log messages ("Audio discontinuity seen").

@jya, just FYI as another data point: I also have issue with audio stuttering as described in this ticket. I can confirm, reverting 5f11bda1994c0dad45ff29e3fc8836eb83f98116 solves issue. I'm on current 0.26-fixes. Test was with iPhome 4 6.1.2

commit 9ec7421138adef73ef9cb83b74e046092fecdd6a that fixed audio timestamp calculations revealed an issue in the way RAOP was calculating and setting time syncing.
Rework how things are done: We now calculate the audio card latency and simply drop the initial audio frames amounting for such length of time. From that point on, when we get too far behind we drop all queued audio and restart.

Rather than dropping a whole audio packet at a time (352 frames) we now drop frame by frame, so re-syncs are much smoother.

Surprisingly, this simpler method gives much better results. Synchronisation across multiple airplay device is almost perfect (tested across 2 macs and one linux). Remote audio and video sync are spot on.

commit 9ec7421138adef73ef9cb83b74e046092fecdd6a that fixed audio timestamp calculations revealed an issue in the way RAOP was calculating and setting time syncing.
Rework how things are done: We now calculate the audio card latency and simply drop the initial audio frames amounting for such length of time. From that point on, when we get too far behind we drop all queued audio and restart.

Rather than dropping a whole audio packet at a time (352 frames) we now drop frame by frame, so re-syncs are much smoother.

Surprisingly, this simpler method gives much better results. Synchronisation across multiple airplay device is almost perfect (tested across 2 macs and one linux). Remote audio and video sync are spot on.