2009-12-25 01:59:39 +01:00
|
|
|
|
|
|
|
/*******************************************************************************/
|
2013-08-06 09:03:19 +02:00
|
|
|
/* Copyright (C) 2013 Jonathan Moore Liles */
|
2009-12-25 01:59:39 +01:00
|
|
|
/* */
|
|
|
|
/* This program is free software; you can redistribute it and/or modify it */
|
|
|
|
/* under the terms of the GNU General Public License as published by the */
|
|
|
|
/* Free Software Foundation; either version 2 of the License, or (at your */
|
|
|
|
/* option) any later version. */
|
|
|
|
/* */
|
|
|
|
/* This program is distributed in the hope that it will be useful, but WITHOUT */
|
|
|
|
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
|
|
|
|
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
|
|
|
|
/* more details. */
|
|
|
|
/* */
|
|
|
|
/* You should have received a copy of the GNU General Public License along */
|
|
|
|
/* with This program; see the file COPYING. If not,write to the Free Software */
|
|
|
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/*******************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-08-06 09:03:19 +02:00
|
|
|
#include <list>
|
|
|
|
class Mixer_Strip;
|
|
|
|
|
2010-02-01 07:25:16 +01:00
|
|
|
#include "Mutex.H"
|
2009-12-25 01:59:39 +01:00
|
|
|
|
|
|
|
class Port;
|
|
|
|
|
|
|
|
#include "JACK/Client.H"
|
|
|
|
|
|
|
|
#include "Thread.H"
|
2013-08-06 09:03:19 +02:00
|
|
|
#include "Loggable.H"
|
2009-12-25 01:59:39 +01:00
|
|
|
|
2013-08-06 09:03:19 +02:00
|
|
|
class Group : public Loggable, public JACK::Client, public Mutex
|
2009-12-25 01:59:39 +01:00
|
|
|
{
|
2013-08-06 09:03:19 +02:00
|
|
|
bool _single;
|
|
|
|
char *_name;
|
|
|
|
|
2009-12-25 01:59:39 +01:00
|
|
|
Thread _thread; /* only used for thread checking */
|
|
|
|
|
|
|
|
int _buffers_dropped; /* buffers dropped because of locking */
|
|
|
|
/* int _buffers_dropped; /\* buffers dropped because of locking *\/ */
|
|
|
|
|
2013-08-09 08:32:44 +02:00
|
|
|
volatile float _dsp_load;
|
|
|
|
float _load_coef;
|
|
|
|
|
2013-06-16 02:51:50 +02:00
|
|
|
int sample_rate_changed ( nframes_t srate );
|
2009-12-25 01:59:39 +01:00
|
|
|
void shutdown ( void );
|
|
|
|
int process ( nframes_t nframes );
|
|
|
|
int xrun ( void );
|
|
|
|
void freewheel ( bool yes );
|
|
|
|
int buffer_size ( nframes_t nframes );
|
|
|
|
void thread_init ( void );
|
2013-04-22 08:14:52 +02:00
|
|
|
void port_connect ( jack_port_id_t a, jack_port_id_t b, int connect );
|
2013-08-24 23:21:44 +02:00
|
|
|
virtual void latency ( jack_latency_callback_mode_t mode );
|
2013-08-06 09:03:19 +02:00
|
|
|
|
|
|
|
/* not allowed */
|
|
|
|
Group ( const Group &rhs );
|
|
|
|
Group & operator = ( const Group &rhs );
|
2009-12-25 01:59:39 +01:00
|
|
|
|
|
|
|
void request_locate ( nframes_t frame );
|
|
|
|
|
2013-08-09 08:32:44 +02:00
|
|
|
void recal_load_coef ( void );
|
2013-08-06 09:03:19 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void get ( Log_Entry &e ) const;
|
|
|
|
virtual void set ( Log_Entry &e );
|
|
|
|
|
2009-12-25 01:59:39 +01:00
|
|
|
private:
|
|
|
|
|
|
|
|
friend class Port;
|
|
|
|
friend class Transport;
|
|
|
|
|
2013-08-06 09:03:19 +02:00
|
|
|
public:
|
2009-12-25 01:59:39 +01:00
|
|
|
|
2013-08-06 09:03:19 +02:00
|
|
|
LOG_CREATE_FUNC( Group );
|
2009-12-25 01:59:39 +01:00
|
|
|
|
2013-08-09 08:32:44 +02:00
|
|
|
float dsp_load ( void ) const { return _dsp_load; }
|
2013-08-06 09:03:19 +02:00
|
|
|
int nstrips ( void ) const { return strips.size(); }
|
2009-12-25 01:59:39 +01:00
|
|
|
int dropped ( void ) const { return _buffers_dropped; }
|
2013-08-06 09:03:19 +02:00
|
|
|
|
|
|
|
Group ( );
|
|
|
|
Group ( const char * name, bool single );
|
|
|
|
virtual ~Group ( );
|
|
|
|
|
|
|
|
bool single ( void ) const { return _single; }
|
|
|
|
|
|
|
|
const char * name ( void ) const { return _name; }
|
|
|
|
void name ( const char *n );
|
|
|
|
|
|
|
|
std::list<Mixer_Strip*> strips;
|
|
|
|
|
|
|
|
/* static void process ( nframes_t nframes, void *v ); */
|
|
|
|
/* void process ( nframes_t nframes ); */
|
|
|
|
|
|
|
|
void add (Mixer_Strip*);
|
|
|
|
void remove (Mixer_Strip*);
|
|
|
|
|
2020-12-03 05:13:44 +01:00
|
|
|
int children ( void ) const { return strips.size(); }
|
|
|
|
|
2013-08-06 09:03:19 +02:00
|
|
|
/* Engine *engine ( void ) { return _engine; } */
|
2009-12-25 01:59:39 +01:00
|
|
|
};
|
2013-08-06 09:03:19 +02:00
|
|
|
|