Within the drawwave method in WaveformCanvas object the value YScale
will be always 1 by definition of the size of the Canvas. So neither
the YScale nor the me.height value which is always 300 will accomplish
that whatever the signal range of theSampleValue it will fall between
+150 and -150.

The line in the code is this:
n = (theSampleValue/256) * me.height

because theSampleValue is integer, it seems to me that there will be a
great separation if the number falls above 256 and below. If below
then n will tend to very little and if above then it will be very
high.
I was proposing:
n= theSampleValue
however, I have not seen any negative value though in the wave soundmemoryblock.

any hints?

luis

On 2/20/07, Luis Cordova <[EMAIL PROTECTED]> wrote:
> Ok, now I corrected the x value. It seems that a division was made of
> two values being the denominator too high of a value so the result was
> always 0 and then this number in turn would divide another which will
> result in the negative infinite number we were seeing. Now it advances
> nicely provided I place the code:
>
>  if theXScale < 1 then
>    theXScale = 1
>  end if
>
> however now I see that there are still some tweaks to do because the y
> value spikes at the beginning and they do show up too low in the rest
> of the signal tail.
> I can see the signal varying however it does not provide for a proper
> view of the signal. I wonder if this is the same behavior in a Mac?
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to