[Tiptoi] Prevent interruption of play

Michael Thon m7.thon at gmail.com
Fr Jun 30 12:02:32 CEST 2017


No, PA(...) and also PA*(...) audio can be interrupted.

> On 30. Jun 2017, at 11:51, Boris Baumann <boris.baumann at googlemail.com> wrote:
> 
> Hi Thon!
> 
> Did  PA(...) instead of P(...) works for you?
> 
> 
> 
> 
> 
> --
> pgpid: 0x44B30067
> 9288 B559 5CC4 208C 98DA 29AD DECC 272C 44B3 0067
> 
> 
> 
> 2017-06-30 11:08 GMT+02:00 Michael Thon <m7.thon at gmail.com <mailto:m7.thon at gmail.com>>:
> Hi,
> 
> I tried your suggestion, and it doesn't work. However, the following construction does appear to do what I want (at least on my older tiptoi):
> 
> product-id: 930
> media-path: audio/%s
> init: $playing:=0
> scripts:
>  play_one:
>  - $playing==0? $playing:=1 J(done) P(hint1)
>  play_two:
>  - $playing==0? $playing:=1 J(done) P(hint2)
>  done:
> - $playing:=0
> 
> Interestingly, it is crucial to use a jump instruction, and to put the jump instruction *before* the play instruction.
> 
> If the jump instruction is at the end of the line, then the jump can get interrupted. What I mean is: tipping on something during the play of the hint will not interrupt the playing of the hint, but the jump will no longer be executed, i.e., $playing is not reset to 0. If the jump instruction is put before the play instruction, then this does not happen, but the instruction is apparently only executed after the play finishes anyway. Weird stuff (but not unexpected after reading the other posts about the order of J() and P() instructions). I'd be curious to know if this works on newer tiptoi pens as well.
> 
> I'll use this for now, but perhaps there is a better way.
> 
> Thanks,
> Michael
> 
> 
> > On 30. Jun 2017, at 09:46, Till Korten <korten at mpi-cbg.de <mailto:korten at mpi-cbg.de>> wrote:
> >
> > Have you tried something like this (untested):
> >
> > product-id: 930
> > media-path: audio/%s
> > init: $playing:=0
> > scripts:
> >  play_one:
> >  - $playing==0? $playing:=1 P(hint1) $playing:=0
> >  play_two:
> >  - $playing==0? $playing:=1 P(hint2) $playing:=0
> >
> > On 30.06.2017 09:02, Michael Thon wrote:
> >> Hi there,
> >>
> >> I am new to tttool, and already having lots of fun. Thanks!
> >>
> >> I am preparing a treasure hunt, and it would be very helpful if there was some way to prevent the tiptoi from interrupting the audio played by a play command. Currently, when audio is playing, and some other oid (with sound?) is clicked, then the audio output is interrupted. I thought I had read somewhere that there is some special register that sets the tiptoi to "non-interrupting mode", or something like that, but I cannot find it anymore, and maybe I was just dreaming.
> >>
> >> Alternatively, is there some way to only execute the other commands (changing state) that follow the play command if the play has completed uninterrupted?
> >>
> >> I'm grateful for any hints, and for the effort that has gone into hacking the tiptoi.
> >>
> >> Thanks,
> >> Michael
> >
> > <korten.vcf>--
> > tiptoi mailing list
> > tiptoi at lists.nomeata.de <mailto:tiptoi at lists.nomeata.de>
> > https://lists.nomeata.de/mailman/listinfo/tiptoi <https://lists.nomeata.de/mailman/listinfo/tiptoi>
> 
> 
> --
> tiptoi mailing list
> tiptoi at lists.nomeata.de <mailto:tiptoi at lists.nomeata.de>
> https://lists.nomeata.de/mailman/listinfo/tiptoi <https://lists.nomeata.de/mailman/listinfo/tiptoi>
> 
> -- 
> tiptoi mailing list
> tiptoi at lists.nomeata.de
> https://lists.nomeata.de/mailman/listinfo/tiptoi

-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <https://lists.nomeata.de/pipermail/tiptoi/attachments/20170630/4e2a71c7/attachment.htm>


Mehr Informationen über die Mailingliste tiptoi