Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: wave progress

From: henrikmk::gmail::com at: 10-Oct-2008 13:56

On Fri, Oct 10, 2008 at 9:25 AM, Rosemary de Dear <rcm-formix.com.au> wrote:
> Hello list, > > I want to include a progress bar on a wave player, but can't get it to go > beyond one iteration of > > prog/data: prog/data + step > > The outcome of the above looks correct for differing file sizes. I > calculate the step value as follows: > > step: (prog/size/x / (max 1 fileSize)) > > I will send the script, but I suspect someone out there has already done > this, however, I can't see anything in the Library or through Googling.
I can't tell much from this, so my suggestion may be off course, but the progress should be set using SET-FACE to a decimal value between 0 and 1. It's better to calculate the absolute value, rather than using a step value. To calculate the value, you should not refer to the progress bar size itself, but the size of the wave file (as you are doing correctly) and the point at which you are reading the wave file. I assume you know how much of the wave file you are reading at a time and how you play it. set-face prog wave-size / point-in-wave-file And that's it. Again, sorry, if I'm way off course. -- Regards, Henrik Mikael Kristensen