• 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
Multiple AVAudioPlayer - locking main thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Multiple AVAudioPlayer - locking main thread?
      • From: Seth Willits <email@hidden>
  • Prev by Date: Another AS-ObjC Question
  • Next by Date: Window updates stall on headless Mac mini
  • Previous by thread: Another AS-ObjC Question
  • Next by thread: Re: Multiple AVAudioPlayer - locking main thread?
  • Index(es):
    • Date
    • Thread