Skip to content

Commit

Permalink
fix xompilation errors
Browse files Browse the repository at this point in the history
hopefully fix #645 for good

Update cybuf.c
  • Loading branch information
porres committed Aug 16, 2024
1 parent 381515d commit 2b2464a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions cyclone_objects/binaries/audio/bitand.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static t_class *bitand_class;
static void bitand_intmask(t_bitand *x, t_floatarg f)
{
x->x_mask = (int32_t)f;
pd_float(x->x_rightinlet, (t_float)x->x_mask);
pd_float((t_pd *)x->x_rightinlet, (t_float)x->x_mask);
}

static t_int *bitand_perform(t_int *w)
Expand Down Expand Up @@ -114,7 +114,7 @@ static void bitand_bits(t_bitand *x, t_symbol *s, int ac, t_atom *av)
t_float f;
magic_setnan(&f);
x->x_mask = bitwise_getbitmask(ac, av);
pd_float(x->x_rightinlet, f);
pd_float((t_pd *)x->x_rightinlet, f);
}

static void bitand_mode(t_bitand *x, t_floatarg f)
Expand All @@ -130,7 +130,7 @@ static void *bitand_new(t_floatarg f1, t_floatarg f2)
x->x_glist = canvas_getcurrent();
x->x_rightinlet = inlet_new((t_object *)x, (t_pd *)x, &s_signal, &s_signal);
outlet_new((t_object *)x, &s_signal);
x->x_signalscalar = obj_findsignalscalar(x, 1);
x->x_signalscalar = obj_findsignalscalar((t_object *)x, 1);
bitand_intmask(x, f1);
bitand_mode(x, f2);
return (x);
Expand Down
6 changes: 3 additions & 3 deletions cyclone_objects/binaries/audio/bitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static t_class *bitor_class;
static void bitor_intmask(t_bitor *x, t_floatarg f)
{
x->x_mask = (int32_t)f;
pd_float(x->x_rightinlet, (t_float)x->x_mask);
pd_float((t_pd *)x->x_rightinlet, (t_float)x->x_mask);
}

static t_int *bitor_perform(t_int *w)
Expand Down Expand Up @@ -118,7 +118,7 @@ static void bitor_bits(t_bitor *x, t_symbol *s, int ac, t_atom *av)
t_float f;
magic_setnan(&f);
x->x_mask = bitwise_getbitmask(ac, av);
pd_float(x->x_rightinlet, f);
pd_float((t_pd *)x->x_rightinlet, f);
}

static void bitor_mode(t_bitor *x, t_floatarg f)
Expand All @@ -134,7 +134,7 @@ static void *bitor_new(t_floatarg f1, t_floatarg f2)
x->x_glist = canvas_getcurrent();
x->x_rightinlet = inlet_new((t_object *)x, (t_pd *)x, &s_signal, &s_signal);
outlet_new((t_object *)x, &s_signal);
x->x_signalscalar = obj_findsignalscalar(x, 1);
x->x_signalscalar = obj_findsignalscalar((t_object *)x, 1);
bitor_intmask(x, f1);
bitor_mode(x, f2);
return (x);
Expand Down
6 changes: 3 additions & 3 deletions cyclone_objects/binaries/audio/bitxor.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static t_class *bitxor_class;
static void bitxor_intmask(t_bitxor *x, t_floatarg f)
{
x->x_mask = (int32_t)f;
pd_float(x->x_rightinlet, (t_float)x->x_mask);
pd_float((t_pd *)x->x_rightinlet, (t_float)x->x_mask);
}

static t_int *bitxor_perform(t_int *w)
Expand Down Expand Up @@ -125,7 +125,7 @@ static void bitxor_bits(t_bitxor *x, t_symbol *s, int ac, t_atom *av)
t_float f;
magic_setnan(&f);
x->x_mask = bitwise_getbitmask(ac, av);
pd_float(x->x_rightinlet, f);
pd_float((t_pd *)x->x_rightinlet, f);
}

static void bitxor_mode(t_bitxor *x, t_floatarg f)
Expand All @@ -141,7 +141,7 @@ static void *bitxor_new(t_symbol *s, int argc, t_atom * argv)
x->x_glist = canvas_getcurrent();
x->x_rightinlet = inlet_new((t_object *)x, (t_pd *)x, &s_signal, &s_signal);
outlet_new((t_object *)x, &s_signal);
x->x_signalscalar = obj_findsignalscalar(x, 1);
x->x_signalscalar = obj_findsignalscalar((t_object *)x, 1);

//defaults
t_float bitmask = PDCYBXORMASK;
Expand Down
4 changes: 2 additions & 2 deletions documentation/help_files/pv-help.pd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#X connect 6 0 9 0;
#X connect 10 0 5 0;
#X restore 411 183 pd pv_in_a_subpatch_2;
#N canvas 327 218 843 323 pv_in_a_subpatch_1 0;
#N canvas 327 218 843 323 pv_in_a_subpatch_1 1;
#X obj 192 129 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 192 197 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 127 129 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
Expand All @@ -87,8 +87,8 @@
#X text 509 151 store variable 'y';
#X text 684 158 retrieve 'y';
#X text 42 247 And since the parent patch also has a [pv] with the same name \, the value stored here is also shared with other subpatches.;
#X text 445 56 But if you have a [pv] with a variable name that is not present in the subpatch \, the stored messages will only be shared within this subpatch \, even if other subpatches have [pv] objects with the same variable name - to check it \, open [pv_in_a_subpatch_2].;
#X text 544 239 only works in this subpatch!;
#X text 445 56 But if you have a [pv] with a variable name that is not present in a parent patch \, the stored messages will only be shared within this subpatch \, even if other subpatches have [pv] objects with the same variable name - to check it \, open the [pd pv_in_a_subpatch_2] subpatch in the parent patch.;
#X connect 0 0 10 0;
#X connect 2 0 10 0;
#X connect 5 0 9 0;
Expand Down
6 changes: 3 additions & 3 deletions shared/signal/cybuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void cybuf_free(t_cybuf *c)
void *cybuf_init(t_class *owner, t_symbol *bufname, int numchans, int singlemode){
//name of buffer (multichan usu, or not) and the number of channels associated with buffer
t_cybuf *c = (t_cybuf *)getbytes(sizeof(t_cybuf));
t_float **vectors;
t_word **vectors;
t_symbol **channames = 0;
if (!bufname){
bufname = &s_;
Expand All @@ -275,7 +275,7 @@ void *cybuf_init(t_class *owner, t_symbol *bufname, int numchans, int singlemode
singlemode = singlemode > 0 ? 1 : 0;
//single mode forces numchans = 1
numchans = (numchans < 1 || singlemode) ? 1 : (numchans > CYBUF_MAXCHANS ? CYBUF_MAXCHANS : numchans);
if (!(vectors = (t_float **)getbytes(numchans* sizeof(*vectors)))){
if (!(vectors = (t_word **)getbytes(numchans* sizeof(*vectors)))){
return (0);
};

Expand All @@ -287,7 +287,7 @@ void *cybuf_init(t_class *owner, t_symbol *bufname, int numchans, int singlemode
c->c_single = singlemode;
c->c_owner = owner;
c->c_npts = 0;
c->c_vectors = vectors;
c->c_vectors = (t_word**)vectors;
c->c_channames = channames;
c->c_disabled = 0;
c->c_playable = 0;
Expand Down

0 comments on commit 2b2464a

Please sign in to comment.