Fading audio in NSMovieView
Fading audio in NSMovieView
- Subject: Fading audio in NSMovieView
- From: Dave Rosborough <email@hidden>
- Date: Sat, 4 Oct 2003 12:35:53 -0700
Hello all.
I'm trying to fade audio while an NSMovieView is playing a movie. The
approach I've taken is to create an NSTimer that calls a method in the
movie view to reduce the volume by a fixed increment. Generally, the
timer's interval will end up being somewhere in the range of 0.1
seconds. My problem is that the timer isn't firing anywhere near often
enough, since the CPU is too busy playing the (rather large) movie
files. It works fine on movies that are very small in size, but as
soon as my movies hit 40-50 MB's the results are unsatisfactory.
Is there an obvious solution I'm missing? I've looked through the
Quicktime API and tried a variety of things like prerolling the movie,
calling the SetMovieVolume() function rather than the -setVolume method
of NSMovieView, etc. Would placing the timer in a separate thread help
(I'm a little uncertain when it comes to multithreading)? Is there a
better way to do this altogether (using some sort of QuickTime plugin
perhaps)?
Thanks,
DaveR
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.