示例#1
0
static void routeOSC_list(t_routeOSC *x, t_symbol *s, int argc, t_atom *argv)
{
    if(argc < 1)
    {
      pd_error(x, "* routeOSC: ignoring empty list...");
      return;
    }
    if (argv[0].a_type == A_SYMBOL)
    { 
        /* Ignore the fact that this is a "list" */
        routeOSC_doanything(x, argv[0].a_w.w_symbol, argc-1, argv+1);
    }
    else
    {
        // pd_error(x, "* OSC-route: invalid list beginning with a number");
        // output on unmatched outlet jdl 20020908
        if (argv[0].a_type == A_FLOAT)
        {
          outlet_float(x->x_outlets[x->x_num], atom_getfloat(argv));
        }
        else
        {
          pd_error(x, "* routeOSC: unrecognized atom type!");
        }
    }
}
示例#2
0
static void routeOSC_list(t_routeOSC *x, t_symbol *s, int argc, t_atom *argv)
{
    /* output non-OSC data on rightmost outlet */
    if (x->x_verbosity) post("routeOSC_list (%p) s=%s argc is %d", x, s->s_name, argc);

    if (0 == argc) post("routeOSC_list (%p) empty list", x);/* this should never happen but catch it just in case... */

    else if (argv[0].a_type == A_SYMBOL) routeOSC_doanything(x, argv[0].a_w.w_symbol, argc-1, &argv[1]);

    else if (argv[0].a_type == A_FLOAT)
    {
        if (x->x_verbosity) post("routeOSC_list (%p) floats:", x);
        outlet_list(x->x_outlets[x->x_num], 0L, argc, argv);
    }
}