Re: CLI audio file player?
Re: CLI audio file player?
- Subject: Re: CLI audio file player?
- From: Kurt Revis <email@hidden>
- Date: Mon, 21 Oct 2002 10:45:31 -0700
On Monday, October 21, 2002, at 06:34 AM, Kevin R. Boyce wrote:
http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz
As written, it skipped a lot on my TiBook 500. But, without actually
understanding the code, I simply increased the buffer size a bit and
bumped up the feeder thread priority a couple notches. Easy, just by
reading the comments (thanks, Kurt!) Recompiled, and viola!
Skip-free, even with 100% CPU usage for minutes at a time.
I think the last time I played with the settings was on 10.1. When I
switched to 10.2 I noticed some skipping, but bumping up the feeder
thread importance from 4 to 6 fixed that. (This seems to match the
priority that iTunes uses for its feeder thread; there's also another
thread with a priority one more than that, but it uses very little time
and I don't know what it's for... possibly just signaling.)
Anyway, I should update the downloadable version.
It's also worth noting that under 10.2, command-line tools seem to run
at a default priority of 31, whereas full applications are at 46. I
don't think that applications got an increased priority under 10.1.
This may mean that I should bump up the priority even more--my feeder
thread should be at least the priority of any old application's main
thread--but it seems to work OK as it is.
Which makes me wonder why all the DJ apps I can find (via
VersionTracker) have problems with skipping. Not using CoreAudio,
maybe.
Or just not caring about the details... or it's harder in real life
than in this little demo.
I'm thinking you wrap a UI around this code and you've got the basics
right there.
As always, much easier said than done!
--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.