Hi Carlo, All kinds of things could be causing this audio dropout. MoviesTask is the way to avoid the dropouts, but really what you need to do is to track down any aspects of your application which might be causing the dropouts.
For example, I have a DJ application, which used to suffer from dropouts when in tight for...next loops. What I did was to add in a call to MoviesTask every n times through the loop, and this made sure that audio playback got enough attention to avoid dropouts. Taking this further, pretty much any other actions can cause audio dropouts if the block the main application thread. What you'll need to do is to check every loop and detailed action in your app, and make sure that if it could cause an audio dropout, that it calls MoviesTask often enough. Testing on a machine with a lower spec than your application's base spec is always a good way to do this. To take this to the extreme case, I found that some of the actions my app needed to perform - namely movie export and audio analysis - would cause audio dropouts no matter how many times I called MoviesTask. What I did in the end was to write an RB plugin which would perform these heavy tasks on a true preemptive background thread, thereby avoiding audio dropouts altogether. You may not need to go to this extreme, but if you do, then be aware that REALbasic's threads are not pre-emptive threads, and so won't provide the true background threading that you need. It starts getting complex around this point :-) QuickTime 7 introduced improved threading on Mac OS X, and you can read all about movie threading here: http://developer.apple.com/technotes/tn/tn2125.html Hopefully you won't need to go to these extremes! The REALbasic movie controller is basically a wrapper for the standard QuickTime MovieController, which does task movie playback, but can't cope with all situations where something else - in your application or externally - puts a heavy load on the processor. Hope this helps! Dave. > From: Carlo Rubini <[EMAIL PROTECTED]> > Reply-To: REALbasic NUG <[email protected]> > Date: Sun, 17 Sep 2006 19:13:53 +0600 > To: REALbasicNUGlist Network Users Group > <[email protected]> > Subject: spotlight > > I have a vage recollection that some months ago somebody talked about some > indesiderable effects that Spotlight could cause to some applications. > > Now, I have this application of mine that plays QuickTime audio-files. During > playback, at irregular intervals, the playback suddenly stops for a tiny > moment and then it resumes by itself. > I am wondering whether such interruptions were caused by Spotlight. > > If that were the case, since I cant access the Archive, can anybody remind me > which kind of tinkering I should make with Spotlight? (Apart than unchecking > its checked boxes). > > At present, when the MoviePlayer starts playing a timer fires with the > following declare: > > Declare Sub MoviesTask Lib kQuickLib (movie as Integer, maxMilliSecToUse as > Integer) > MoviesTask 0, 0 > > Suggestions welcome. Thanks. > (RB 5.5.5 Mac OS X.4) > -- > Carlo > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
