player result codes?
Ben Rubinstein
benr_mc at cogapp.com
Sun Jul 23 17:52:57 EDT 2006
On 19/7/06 23:22, Phil Davis wrote:
> In my experience, 'start player' used to return empty until something
> changed, and now I get a 2-digit number most of the time. And I often
> get the same number a couple of times in a row, even if I change the
> player filename. Go figger.
>
> FWIW, I decided my client's software doesn't need to do that test after
> all. :o) It's almost impossible to buy an off-the-shelf machine that
> doesn't do sound. Plus, I'm not really sure what the returned value
> tells you - my original assumption was that the player would return a
> non-empty value if the 'start player' command didn't finish
> successfully. I guess I'll prove/disprove that one and call it good.
I'd also like to know what that result means - in general I think it would be
great if the dictionary had a standard callout "result" to describe the result
of all commands and messages, just like it has "parameters". It's one of the
few tricks that I think were missed in the original TD.
Anyway, back to your question - while I don't know what that number signifies
either - I can say that from experience recently working with machines that
didn't do sound (custom made units with Windows XP Embedded), in this instance
you get an error before using "start player", at the point that you set the
filename - ie even if the file exists, when you set the filename of the player
Rev doesn't just store that but starts pre-rolling the file, setting the
properties of the player that you might want to interrogate like duration etc.
Certainly if you've got the sound hardware, but the software
infrastructure to play the sound isn't right, you get an error at that stage.
My guess is that if you don't have the audio hardware, the software would
either not be installed or report an error back to Rev also.
If the machine doesn't do sound, you'll get an error when you set the filename
of the player. If you didn't get an error at that stage, I think you can be
confident that start player will work.
HTH,
Ben Rubinstein | Email: benr_mc at cogapp.com
Cognitive Applications Ltd | Phone: +44 (0)1273-821600
http://www.cogapp.com | Fax : +44 (0)1273-728866
More information about the use-livecode
mailing list