Re: AVAssetReaderTrackOutput fails with error code -11800
Re: AVAssetReaderTrackOutput fails with error code -11800
- Subject: Re: AVAssetReaderTrackOutput fails with error code -11800
- From: Brian Willoughby <email@hidden>
- Date: Sun, 19 Jun 2011 15:49:33 -0700
Did you literally code usleep for 1 second, or is it actually 1
microsecond? The reason I ask is that you could usleep for 1
microsecond on every opened song instead of every 300, and the
scheduler would have way more opportunity to switch to higher
priority threads. Sleeping for a microsecond is not going to destroy
your performance even if you do it between every song. Generally, I
find that any time I have a loop in a background thread it makes
sense to usleep() on every pass through the loop just to avoid
hogging the CPU.
Brian Willoughby
Sound Consulting
On Jun 19, 2011, at 03:27, Heinrich Fink wrote:
thanks for sharing your findings! I have modified my example code
to use usleep for 1 second every 300 opened songs. This seems to
work very well. With this modification I was able to successfully
open and close 10 000 songs on the lower priority queue (which
would not have been possible without inserting usleep).
_______________________________________________
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