[CM] GUILE -> Abnormal Exit (snd-rt)

Kjetil S. Matheussen k.s.matheussen@notam02.no
Sun, 25 Mar 2007 22:37:04 +0200 (CEST)

On Sun, 25 Mar 2007, Esben Stien wrote:

> "Kjetil S. Matheussen" <k.s.matheussen@notam02.no> writes:
>> replace the "synthesize" function with your own sound generator [..]
>> plus add some code to set the "freq" variable and reset the phase of
>> "osc" in the "not-playing-func" function
> I'm on thin ice here;), but after initially changing the synthesize
> function and creating the freq and oscil, I'm getting the following
> after I compiled the code and tried to evaluate (san-dysth). The error
> message abut too many arguments seems trivial to fix, but I can't
> figure out where this is happening, sorry;).
> The modified code is below.
> Error. What the? c-nevercalled-true? is never supposed to be called. Arguments: (#<src: width: 20, x: 0,000, incr: 0,000, sinc table len: 20000>)
> rt-compiler/<rt-type>. Wrong type. " sr " with value " #<src: width: 
> 20, x: 0,000, incr: 0,000, sinc table len: 20000> " is not a <mus_any-*> .
> snd-error!

The rt language uses static typing, and tries to figure out the 
types of variables automatically. For this code, the compiler wasn't 
able to figure out "sr"'s type.

I'm not quite sure why, but I guess its because there is only a 
method call "(mus-reset sr)" on the variable in your code, and perpahs the 
processing routine must be called sometime for the type to be 
correctly set.

Anyway, just remove that "(mus-reset sr)" call that made the trouble, 
since "sr" isn't used anymore.