Remote audio file does not always play

J. Landman Gay jacque at hyperactivesw.com
Tue May 20 14:06:54 EDT 2014


I think Klaus is the player expert, but at any rate, you're the network 
expert.

The player audio is a narration and has a constant volume. On opencard, 
the filename of the player is set to empty, then loaded with the new 
URL, and playback initiated like this:

  set the filename of player pPlayerName of cd 1 of me to empty
   set the filename of player pPlayerName of cd 1 of me to tFileName
   if the result = "" then
     set the currenttime of player pPlayerName of cd 1 of me to 1 -- 
otherwise Windows stutters
     start player pPlayerName of cd 1 of me -- required or callbacks 
aren't sent
     set the playrate of player pPlayerName of cd 1 of me to 1 -- start 
it this way, "start" command doesn't always work with http
   else
     log "Could not play" && pPlayerName && "audio:" && the result
   end if

There are no log entries for any errors.

I had some problems with playback before and the list suggested using 
"start" instead of "play". Apparently there's a problem with just 
"play"; when that was all I used, the player never started up at all 
most of the time. We do use callbacks in these, and just using "start" 
alone didn't respect the callbacks, but I found that using both commands 
allowed callbacks and also started playback.

Maybe there is something going on with that combination, but again, it 
works almost 100% of the time. And I myself have never seen a problem, 
the report is coming from a couple of testers. Since there's two people 
reporting it, it must be more universal than a single user's setup.

Stephen's comment about all the pre/opencard messages is a good one, and 
my script adds a couple dozen additional commands to the sequence. I'll 
move the audio playback to the very end of all that and see if that 
helps. There is a lot going on when a card opens in this stack.

If you have any other ideas, please do tell.



On 5/20/14, 12:37 PM, Dar Scott wrote:
> I am very hesitant to say anything, since you are the expert here.
>
> Does the player have a relatively quiet ending?  Do you stop the player when you change cards?  Could the currentTime be left in the quiet ending and the play starting there?
>
> Does the result show an error?
>
> Dar
>
>
> On May 20, 2014, at 11:18 AM, J. Landman Gay <jacque at hyperactivesw.com> wrote:
>
>> I have a player whose filename is set to an audio URL on the web whenever a card opens. For 99.9% of the time it works fine but occasionally it does not play. If the user goes to another card and then returns to the original card, it does play.
>>
>> Checking the result after setting the filename shows no errors of any kind.
>>
>> I have the feeling this is a network issue, but does anyone know what would cause it to fail?
>>
>> --
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list