Page 1 of 1

embedded audio clips pause

Posted: Mon Sep 10, 2018 10:13 pm
by markhinnebusch
I know that pause does not work with embedded audio clips but for intellectual property protection, I need to use embedded clips. I remember seeing somewhere on here about someone who had developed a third party that provided extended features for embedded audio clips but for the life of me, I cannot find that reference anymore.

Can anyone point me in the right direction?

On a side note... Does anyone know if you can start a clip in a player and then delete the file while it is playing? That is, do the players buffer or not? if they do, then I guess i could encrypt the audio clip, decrypt it, start the player and then delete the decrypted file. The property owner has already nixed the idea of having the decrypted clip on disk for the duration of the play. Sigh... If no one knows off hand, I'll try it and see what happens.

thanks,
mark

Re: embedded audio clips pause

Posted: Tue Sep 11, 2018 6:09 pm
by jacque
I don't know if a buffered audio file is completely placed in memory at once, or whether it buffers as it plays. I'd suspect the latter but you'd need to test it.

What I've done in the past is store the audio as a custom property and write it to disk on demand. I used the tempfile function to create a file name, which writes it to the reasonably inaccessible temp folder with a file name consisting of random characters. When the playback is complete the file is immediately deleted.

This doesn't meet your requirements exactly but is relatively safe. Most users don't know where the temp folder is (it's deeply hidden on Mac at least) or even that such a folder exists, and the file name is gibberish and often only one of a list of other nonsensical files.

I wouldn't call this secure, but it does require the user to know that the file was written to disk, where the file is, and how to find and retrieve it.

The other option is to stream the audio from a server. That way there is no file at all. Of course, no method will prevent the user from recording the audio as it plays, so I decided that briefly storing the file in a obscure location was as good as anything.

Re: embedded audio clips pause

Posted: Tue Sep 11, 2018 9:02 pm
by jiml
Does anyone know if you can start a clip in a player and then delete the file while it is playing?
I just set the filename of a player to point to a 3GB 1 hour HD movie.
alwaysBuffer was set to TRUE.
I then deleted the file.
Started the player.
It played.
Dragged the controller near to the end.
It still played fine.

So, the answer appears to be YES.

Jim Lambert

Re: embedded audio clips pause

Posted: Tue Sep 11, 2018 9:08 pm
by markhinnebusch
Thanks for the quick replies. It looks like I may be able to do a combination of both. That is, write the file in an obscure location with an obscure name and start the player and then delete the file. That would meet my needs.

Again, thanks for the quick replies.

-mark

Re: embedded audio clips pause

Posted: Wed Sep 12, 2018 12:07 am
by jacque
jiml wrote:
Tue Sep 11, 2018 9:02 pm
I just set the filename of a player to point to a 3GB 1 hour HD movie.
alwaysBuffer was set to TRUE.
I then deleted the file.
Started the player.
It played.
Dragged the controller near to the end.
It still played fine.

So, the answer appears to be YES.
Ohhh... Cool.

Re: embedded audio clips pause

Posted: Thu Sep 13, 2018 4:17 am
by capellan
Hi All,

After reading this statement:
I just set the filename of a player to point to a 3GB 1 hour HD movie.
alwaysBuffer was set to TRUE.
I then deleted the file.
Started the player.
It played.
Dragged the controller near to the end.
It still played fine.
this famous meme, jumped from nowhere:
https://knowyourmeme.com/memes/impossibru

There should be another hidden copy of this 3Gb movie
somewhere in your Hard Disk or...
Did LiveCode memory requirements suddenly jumped
3 Gb more than before?

Al

Re: embedded audio clips pause

Posted: Thu Sep 13, 2018 3:33 pm
by jacque
Good point. Isn't there a terminal command to see what's been written to disk recently?

Edit: On Mac, here's how: https://www.macworld.com/article/105808 ... ecent.html I'm not sure about Windows but it probably has something similar.

Re: embedded audio clips pause

Posted: Thu Sep 13, 2018 7:08 pm
by markhinnebusch
I guess if they are technically competent enough to find the hidden copy and to intuit its existence, then more power to them. You can only do so much. LOL.

Re: embedded audio clips pause

Posted: Sat Sep 15, 2018 1:40 am
by jiml
There should be another hidden copy of this 3Gb movie
somewhere in your Hard Disk or...
Did LiveCode memory requirements suddenly jumped
3 Gb more than before?
Or perhaps the memory requirements of a player are not limited by LC's memory requirements.

Jim Lambert