Multiple AVAudioPlayer - locking main thread?
Multiple AVAudioPlayer - locking main thread?
- Subject: Multiple AVAudioPlayer - locking main thread?
- From: "Eric E. Dolecki" <email@hidden>
- Date: Fri, 18 Mar 2016 20:10:45 +0000
I have audio buttons, each with it's own associated AVAudioPlayer. I am
performing the prepareToPlay for each on a background thread (probably does
anyway, but I am making sure). When I play one, I am playing it on a
background thread. Things work fine, I get a few playing on top of one
another. And then after a little while, occasionally the UI locks up (no
scrolling, no button presses). I'm looking at a Profile for Activity
Monitor of the app - and it's around 600MB which is alarming. Some of the
mp3s I have hooked up are a few minutes long.
I was thinking of instead of preparing them all to play, and then playing
and stopping to just create AVAudioPlayers as needed and kill when not
needed - but generally speaking up to 10 will be playing at the same time.
Any ideas about the main thread lockup?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden