Is there any way of getting the position of a sound (ie. at which point it is)?
I've tried using Memblocks and that's fine for making waveforms but I can't work out how to get the actually playing position.
I've managed to work out at what gap the sound has moved on every second, but with fluctuating frame rates and all it's hard to work out what to do next
I know DBP must know somehow otherwise there would be no sound coming out of the speakers! It's just a matter of finding out where I can get that info.
It's for making a visualisation.
My attempt (it's always a bit long):
rem LOAD SOUND + MAKE WAVEFORMS
rem Load the sound to be used
load sound "test.wav",1
goSub MakeWave
sync rate 0
do
rem pause until FPS has settled down
if screen fps() > 0
play sound 1
do
cls
text 10,10,str$(sound speed(1))
text 10,30,str$(sndlen)
text 400,10,str$(screen fps())
secs = int((sndlen / (sound speed(1))))
text 10,50,str$(secs)
text 10,100,str$(stepval)
text 10,150,str$(p)
stepval = int(sndlen / secs)
stepval = int(stepval / screen fps())
inc p,stepval
if p ly1
ink rgb(39,157,42),0
for ly=ly1 to ly2
ink rgb(ly,0,0),0
dot lx,ly
next ly
ink rgb(0,0,0),0
dot lx,ly1
ink rgb(ly,0,0),0
dot lx,ly2
else
ink rgb(39,157,42),0
for ly=ly2 to ly1
ink rgb(ly,0,0),0
dot lx,ly
next ly
ink rgb(0,0,0),0
dot lx,ly1
ink rgb(ly,0,0),0
dot lx,ly2
endif
inc lx,1
next n
returnVisit [url]www.lightning-systems.co.uk[/url]
You are the http://s15.sitemeter.com/meter.asp?site=s15dtsig[/img]th person to view this signature.