Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5908 > unrolled thread

PlayIt loop problem

Started byAndrew Conroy <a.m.conroy@owlart.co.uk>
First post2019-11-29 22:53 +0000
Last post2019-11-29 22:53 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.sys.acorn.programmer


Contents

  PlayIt loop problem Andrew Conroy <a.m.conroy@owlart.co.uk> - 2019-11-29 22:53 +0000

#5908 — PlayIt loop problem

FromAndrew Conroy <a.m.conroy@owlart.co.uk>
Date2019-11-29 22:53 +0000
SubjectPlayIt loop problem
Message-ID<581abc755fa.m.conroy@owlart.co.uk>
I have PlayIt v1.73 and I'm trying to get it to play a sound sample in a
loop, so it plays the sample twice. The code I have is:

DIM playitblock% 23
SYS "PlayIt_LoadDriver", "PlayIt:SSound"
SYS "PlayIt_Open", "Sample"
SYS "PlayIt_FileInfo", 0, 0, playitblock%
length% = playitblock%!20
SYS "PlayIt_SetLoop", 1, length%, 2
SYS "PlayIt_Play"

but for some reason I don't understand it always plays one more loop than
the value for R2 in PlayIt_SetLoop, unless the value in R2 is 1, when it
does only play the sample once (as per the manual). In the code above,
where I have R2 set to 2, it plays the sample three times.

Does anyone have any experience of using PlayIt and can see what I'm
doing wrong? This seems to happen on RISC OS 3.7, 4.02 and 5.24 that I've
tried so far.

Thanks,

Andrew

-- 
+----------------------------------------+---------------------------------+
| Andrew Conroy, Owl-Art Un-Ltd.         | email: a.m.conroy@argonet.co.uk |
| Coming to you on an Acorn RiscPC SA110 |                                 |
+----------------------------------------+---------------------------------+
      The impossible I can do at once, miracles take a little longer!!

[toc] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web