Ardour  8.7-15-gadf511264b
tailtime.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_tailtime_h__
20 #define __ardour_tailtime_h__
21 
22 #include "pbd/signals.h"
23 
25 #include "ardour/types.h"
26 
27 namespace ARDOUR {
28 
30 public:
31  virtual ~HasTailTime () {}
32  virtual samplecnt_t signal_tailtime () const = 0;
33 };
34 
36 public:
38  TailTime (TailTime const&);
39  virtual ~TailTime() {}
40 
42 
44  if (_use_user_tailtime) {
45  return _user_tailtime;
46  } else {
47  return 0;
48  }
49  }
50 
53 
54  PBD::Signal0<void> TailTimeChanged;
55 
56 protected:
57  int set_state (const XMLNode& node, int version);
58  void add_state (XMLNode*) const;
59 
60 private:
63 };
64 
65 } /* namespace */
66 
67 
68 #endif /* __ardour_tailtime_h__*/
69 
virtual samplecnt_t signal_tailtime() const =0
virtual ~HasTailTime()
Definition: tailtime.h:31
void set_user_tailtime(samplecnt_t val)
void unset_user_tailtime()
virtual ~TailTime()
Definition: tailtime.h:39
samplecnt_t effective_tailtime() const
PBD::Signal0< void > TailTimeChanged
Definition: tailtime.h:54
TailTime(TailTime const &)
void add_state(XMLNode *) const
samplecnt_t _use_user_tailtime
Definition: tailtime.h:61
samplecnt_t _user_tailtime
Definition: tailtime.h:62
int set_state(const XMLNode &node, int version)
samplecnt_t user_latency() const
Definition: tailtime.h:43
Definition: xml++.h:114
#define LIBARDOUR_API
Temporal::samplecnt_t samplecnt_t