+ Monosynth: add inertia for pitch wheel
[calf.git] / src / calf / osctlserv.h
blobfa8d79a1c3c5c426111f465e40d76b7b07759592
1 /* Calf DSP Library
2 * Open Sound Control UDP server support
4 * Copyright (C) 2007-2009 Krzysztof Foltman
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __CALF_OSCTLSERV_H
23 #define __CALF_OSCTLSERV_H
25 #include <glib.h>
26 #include "osctlnet.h"
28 namespace osctl
31 struct osc_server: public osc_socket
33 GIOChannel *ioch;
34 osc_message_dump<osc_strstream, std::ostream> dump;
35 osc_message_sink<osc_strstream> *sink;
37 osc_server() : ioch(NULL), dump(std::cout), sink(&dump) {}
39 virtual void on_bind();
41 static gboolean on_data(GIOChannel *channel, GIOCondition cond, void *obj);
42 void parse_message(const char *buffer, int len);
43 ~osc_server();
48 #endif