Update NTK.
[nondaw.git] / mixer / src / JACK_Module.H
blobcd8c922c6fab9f08e699aa1c17c57f3881f32268
2 /*******************************************************************************/
3 /* Copyright (C) 2009 Jonathan Moore Liles                                     */
4 /*                                                                             */
5 /* This program is free software; you can redistribute it and/or modify it     */
6 /* under the terms of the GNU General Public License as published by the       */
7 /* Free Software Foundation; either version 2 of the License, or (at your      */
8 /* option) any later version.                                                  */
9 /*                                                                             */
10 /* This program is distributed in the hope that it will be useful, but WITHOUT */
11 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       */
12 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for   */
13 /* more details.                                                               */
14 /*                                                                             */
15 /* You should have received a copy of the GNU General Public License along     */
16 /* with This program; see the file COPYING.  If not,write to the Free Software */
17 /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18 /*******************************************************************************/
20 #pragma once
23 #include "Module.H"
24 #include "JACK/Port.H"
25 #include <vector>
27 class JACK_Module : public Module
29     std::vector<JACK::Port> jack_input;
30     std::vector<JACK::Port> jack_output;
32     static void jack_port_activation_error ( JACK::Port *p );
34 public:
36     JACK_Module ( );
37     virtual ~JACK_Module ( );
39     bool allows_external_control ( void ) const { return false; }
40     const char *name ( void ) const { return "JACK"; }
42     bool initialize ( void );
44     int can_support_inputs ( int );
45     bool configure_inputs ( int n );
46     bool configure_outputs ( int n );
48     void add_output ( void );
50     void handle_control_changed ( Port *p );
51     void handle_chain_name_changed ();
53     LOG_CREATE_FUNC( JACK_Module );
55 protected:
57     virtual void process ( nframes_t nframes );