Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
20 
21 #include "pbd/signals.h"
22 
24 #include "ardour/types.h"
25 
26 namespace ARDOUR {
27 
29 public:
30  virtual ~HasTailTime () {}
31  virtual samplecnt_t signal_tailtime () const = 0;
32 };
33 
35 public:
37  TailTime (TailTime const&);
38  virtual ~TailTime() {}
39 
41 
43  if (_use_user_tailtime) {
44  return _user_tailtime;
45  } else {
46  return 0;
47  }
48  }
49 
52 
54 
55 protected:
56  int set_state (const XMLNode& node, int version);
57  void add_state (XMLNode*) const;
58 
59 private:
62 };
63 
64 } /* namespace */
65 
66 
67 
virtual samplecnt_t signal_tailtime() const =0
virtual ~HasTailTime()
Definition: tailtime.h:30
void set_user_tailtime(samplecnt_t val)
void unset_user_tailtime()
virtual ~TailTime()
Definition: tailtime.h:38
samplecnt_t effective_tailtime() const
TailTime(TailTime const &)
void add_state(XMLNode *) const
samplecnt_t _use_user_tailtime
Definition: tailtime.h:60
samplecnt_t _user_tailtime
Definition: tailtime.h:61
int set_state(const XMLNode &node, int version)
samplecnt_t user_latency() const
Definition: tailtime.h:42
PBD::Signal< void()> TailTimeChanged
Definition: tailtime.h:53
Definition: xml++.h:114
#define LIBARDOUR_API
Temporal::samplecnt_t samplecnt_t