From: | John Mason |
Date: | 22 Jul 2001 at 15:16:20 |
Subject: | Re: offset |
Hi Amorel,
> soundsize.l=exists(soundfile$)
> Dim soundarr.l(soundsize)
> For teller.l=0 To soundsize
> soundarr(teller)=XBPeekSound(soundnr,teller)
> Next
> But I expected it to not work, which it doesn`t. I was thinking that upping
> the offset by one is the same as going one byte up. And so peeking in it reads
> one byte into the array. The error I get is data offset too large.
Try "for teller = 0 to soundsize-1" -- since you're starting at 0,
the last byte in the sample will be numbered one less than the actual
length of the file (hopefully :) )..
Also, you'd use 1/4 the amount of RAM if you dim soundarr.l as soundarr.b
since your sample is (I'm assuming) only 8 bit and not 32 bit.
Hope this helps!
John Mason -- ICQ 17931257
http://chebucto.ns.ca/~ah210/Profile.html
Home of Wibby, NewStuff, and Reminder!
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie