diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-11-16 19:41:56 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-11-16 19:41:56 +0000 |
commit | 8b1145a2bcd61ea404b1f611429ec619b5f426ed (patch) | |
tree | 6bd10a04ea19f12732c1d5518b7623a7b7ab5d14 /src | |
parent | dd0a7b6f8c429ba388dd9aef88ce91d1bcb1b23e (diff) |
some quick t_float fixes
svn path=/trunk/externals/OSCx/; revision=15776
Diffstat (limited to 'src')
-rw-r--r-- | src/dumpOSC.c | 6 | ||||
-rw-r--r-- | src/sendOSC.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/dumpOSC.c b/src/dumpOSC.c index b3ddf51..cf74299 100644 --- a/src/dumpOSC.c +++ b/src/dumpOSC.c @@ -810,7 +810,7 @@ static void dumpOSC_PrintTypeTaggedArgs(t_dumpOSC *x, void *v, int n) { case 'f': {
int i = ntohl(*((int *) p));
- float *floatp = ((float *) (&i));
+ t_float *floatp = ((t_float *) (&i));
#ifdef DEBUG
post("float: %f", *floatp);
#endif
@@ -893,7 +893,7 @@ static void dumpOSC_PrintTypeTaggedArgs(t_dumpOSC *x, void *v, int n) { static void dumpOSC_PrintHeuristicallyTypeGuessedArgs(t_dumpOSC *x, void *v, int n, int skipComma) {
int i, thisi;
- float thisf;
+ t_float thisf;
int *ints;
char *chars;
char *string, *nextString;
@@ -911,7 +911,7 @@ static void dumpOSC_PrintHeuristicallyTypeGuessedArgs(t_dumpOSC *x, void *v, int string = &chars[i*4];
thisi = ntohl(ints[i]);
/* Reinterpret the (potentially byte-reversed) thisi as a float */
- thisf = *(((float *) (&thisi)));
+ thisf = *(((t_float *) (&thisi)));
if (thisi >= -1000 && thisi <= 1000000) {
#ifdef DEBUG
diff --git a/src/sendOSC.c b/src/sendOSC.c index 679209d..ffbffab 100644 --- a/src/sendOSC.c +++ b/src/sendOSC.c @@ -81,7 +81,7 @@ typedef struct union
{
int i;
- float f;
+ t_float f;
char *s;
} datum;
} typedArg;
@@ -152,7 +152,7 @@ void sendOSC_openbundle(t_sendOSC *x) return;
}
x->x_bundle = 1;
- outlet_float(x->x_bdpthout, (float)x->x_oscbuf->bundleDepth);
+ outlet_float(x->x_bdpthout, (t_float)x->x_oscbuf->bundleDepth);
}
static void sendOSC_closebundle(t_sendOSC *x)
@@ -162,7 +162,7 @@ static void sendOSC_closebundle(t_sendOSC *x) error("Problem closing bundle: %s\n", OSC_errorMessage);
return;
}
- outlet_float(x->x_bdpthout, (float)x->x_oscbuf->bundleDepth);
+ outlet_float(x->x_bdpthout, (t_float)x->x_oscbuf->bundleDepth);
// in bundle mode we send when bundle is closed?
if(!OSC_isBufferEmpty(x->x_oscbuf) > 0 && OSC_isBufferDone(x->x_oscbuf))
{
@@ -190,7 +190,7 @@ static void sendOSC_settypetags(t_sendOSC *x, t_float *f) static void sendOSC_connect(t_sendOSC *x, t_symbol *s, int argc, t_atom *argv) // t_symbol *hostname, t_floatarg fportno, int argc, t_atom *argv)
{
- float fportno=0;
+ t_float fportno=0;
t_symbol *hostname;
int portno = fportno;
short ttl=-1;
|