BLACK FRIDAY: Save 50% on all our Swift books and bundles! >>

AVQueuePlayer

Forums > Swift

Working on an app where I need to play several relative small audio files (2-5 secs each) sequentially as seamlessly as possible. I've tried having a collection of dedicated AVAudioPlayers that are triggered at the appropriate time via a Timer, but there still seems to be some lag time.

I've got a lot of code around this and basically want some feedback with other approaches to this.

   

Is AVQueuePlayer suitable? If that's not gapless, you could use AVAudioEngine with AVAudioPlayerNode and scheduleFile or scheduleSegment, that will be completely gapless.

   

Save 50% in my Black Friday sale.

SAVE 50% This Black Friday all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.