2
* Pure Data Packet image processor base class implementation.
3
* Copyright (c) by Tom Schouten <pdp@zzz.kotnet.org>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
This file contains the pdp image base class object.
27
#include "pdp_imagebase.h"
31
static void pdp_imagebase_chanmask(t_pdp_base *b, t_floatarg f)
35
b->b_channel_mask = i;
38
void pdp_imagebase_setup(t_class *c)
40
/* parent class setup */
43
/* add pdp base class methods */
44
class_addmethod(c, (t_method)pdp_imagebase_chanmask, gensym("chanmask"), A_FLOAT, A_NULL);
48
/* pdp base instance constructor */
49
void pdp_imagebase_init(void *x)
52
t_pdp_imagebase *b = (t_pdp_imagebase *)x;
57
/* convert all active incoming packet types to image */
58
pdp_base_set_type_template(x, 0, pdp_gensym("image/*/*"));
60
/* default chanmask == all */
61
b->b_channel_mask = -1;
65
/* base instance destructor */
66
void pdp_imagebase_free(void *x)
74
u32 pdp_imagebase_get_chanmask(void *x)
76
t_pdp_base *b = (t_pdp_base *)x;
77
return b->b_channel_mask;