Le 19 avr. 07 à 12:44 Soir, Carlo Rubini a écrit: > Using a moviePlayer object, is there a way to play several tracks > avoiding the very short gap occurring at the end of a track and the > beginning of the next one? > > iTunes can do that, but after several trials I always get the short > gap. This is noticeable especially when the end of a track is not > silent, nor is the beginning of the next track: in other words, > when the next track is supposed to be the continuation of the > previous one.
It's a known problem with the MoviePlayer. I think iTunes handle the sounds more deeply in memory than RB allows (with a buffer), because, if iTunes hangs, it continues to play the current song until the end (well, not for all formats). Maybe you can load the next movie while the current one is playing and you play the second one before the first finishes? > My first try was to make a mMovie.array containg several movies, > and in the stop event of the moviePlayer I put something like this: > > if me.position >= movieSize then > theNext = theNext + 1 > me.movie = mMovie(theNext) > me.play > end if When the stop event fires, the time to load the next movie is often a problem. > Then I used a timer with more or less the same code: > > dim prevPlayer as moviePlayer > if moviePlayer.position >= movieSize -1 then// or movieSize - > 2/-3/-4 > me.mode = 0 > theNext = theNext + 1 > prevPlayer.movie = mMovie(theNext) > prevPlayer.position = 9999999 > movieSize = prevPlayer.position > prevPlayer.position = 0 > moviePlayer1 = prevPlayer > moviePlayer1.play > me.mode = 2 > end if With movieSize - 2, have you tried higher values? In QuickTime player, when a movie is being played and you open another one (double-click from the Finder), you can see that QuickTime player stops playing until the new file is completely open. So, if you load a movie in your application, the one currently playing will certainly stop as well. > Then I tried using two moviePlayer objects. I think it won't help for the same reasons. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
