Commit 2aee81c7 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

workaround for an unknown instruction in valgrind

parent 2fdb6725
...@@ -76,9 +76,9 @@ static void *convolve_tilde_new(t_floatarg prob , t_floatarg tick) ...@@ -76,9 +76,9 @@ static void *convolve_tilde_new(t_floatarg prob , t_floatarg tick)
{ {
// note that prob defaullts to 0.5 // note that prob defaullts to 0.5
prob = 0.5; prob = 0.5;
} }
x->p_prob = prob; x->p_prob = prob;
x->p_normalized_prob = prob * RAND_MAX; x->p_normalized_prob = (int)((double)prob * (double)RAND_MAX);
// set up our clocks // set up our clocks
x->p_ticktime = tick; x->p_ticktime = tick;
x->p_clock = clock_new(x, (t_method) convolve_tilde_tick); x->p_clock = clock_new(x, (t_method) convolve_tilde_tick);
...@@ -168,7 +168,7 @@ static void convolve_tilde_tick(t_convolve_tilde *x) ...@@ -168,7 +168,7 @@ static void convolve_tilde_tick(t_convolve_tilde *x)
void convolve_tilde_setup(void) void convolve_tilde_setup(void)
{ {
srand( (unsigned) time( NULL ) ); srand( (unsigned int) time( NULL ) );
convolve_tilde_class = class_new(gensym("convolve~"), (t_newmethod) convolve_tilde_new, (t_method) convolve_tilde_free, convolve_tilde_class = class_new(gensym("convolve~"), (t_newmethod) convolve_tilde_new, (t_method) convolve_tilde_free,
sizeof(t_convolve_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); sizeof(t_convolve_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN( convolve_tilde_class, t_convolve_tilde, x_f); CLASS_MAINSIGNALIN( convolve_tilde_class, t_convolve_tilde, x_f);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment