I was looking again at the player object in the latest LC version. There had been issues earlier on with AlwaysBuffer and the player object, I wanted to see if there are any improvements. I tested with LC 9.5. and also the latest 9.6. DP2 on MacOS 10.12.6. Here is what I did:
I placed a player object on a stack, linked a video to the player, the video is not even Full HD resolution, I set AlwaysBuffer to true for the player object.
I created a script that is supposed to print every 50 milliseconds a number on top of the player object for 50 times. The number actually indicates how long it took to execute the script for each iteration.
Code: Select all
global counter, tcstart, tcstartabsolut
on mouseUp
set the visible of player "test" to the hilite of button "play"
set the paused of player "test" to not the hilite of button "play"
put empty into field "info"
put empty into field "result"
put the milliseconds into tcstart
put tcstart into tcstartabsolut
put 0 into counter
send printtext to me in 50 milliseconds
end mouseUp
on printtext
put counter + 50 into counter
if counter < 2500 then
put the milliseconds into tcend
put tcend-tcstart & CR after field "info"
put tcend into tcstart
send printtext to me in 50 milliseconds
else
put the milliseconds into tcend
put "ideal: 2500 ms / real: " & tcend-tcstartabsolut & " ms" into field "result"
set the paused of player "test" to true
end if
end printtext
My expectation would be that the total execution time for the script would be a bit over 50*50=2500 milliseconds. In reality it is almost 10 x longer or even more! It takes even up to a second to execute one iteration of the 50 ms loop. You can try it yourself with the attached stack. The video file I used can be downloaded from here: http://speechkaraoke.org/files/benigni_1280x800.mov Can you repeate my test results? Is there any rational explanation? Any hint is appreciated. Thanks. Oliver
PS: this issue is not just of cursory interest, our project depends on the ability to print text on top of videos in order to function. My last working version I run is on 6.5.1. on an ancient macbook with an ancient MacOS. People buy new macs and our software wont run on the latest machines anymore.