Ardour  8.12
speakers.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2011 David Robillard <d@drobilla.net>
3  * Copyright (C) 2010-2013 Paul Davis <paul@linuxaudiosystems.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __libardour_speakers_h__
21 #define __libardour_speakers_h__
22 
23 #include <vector>
24 #include <iostream>
25 
26 #include <pbd/signals.h>
27 #include <pbd/stateful.h>
28 
29 #include "ardour/speaker.h"
30 
31 class XMLNode;
32 
33 namespace ARDOUR {
34 
36 public:
38  Speakers (const Speakers&);
39  virtual ~Speakers ();
40 
41  Speakers& operator= (const Speakers&);
42 
43  virtual int add_speaker (const PBD::AngularVector&);
44  virtual void remove_speaker (int id);
45  virtual void move_speaker (int id, const PBD::AngularVector& new_position);
46  virtual void clear_speakers ();
47  uint32_t size() const { return _speakers.size(); }
48 
49  void setup_default_speakers (uint32_t nspeakers);
50 
51  std::vector<Speaker>& speakers() { return _speakers; }
52 
53  void dump_speakers (std::ostream&);
54 
55  XMLNode& get_state () const;
56  int set_state (const XMLNode&, int version);
57 
58  PBD::Signal0<void> Changed;
59 
60 protected:
61  std::vector<Speaker> _speakers;
62 
63  virtual void update () {}
64 };
65 
66 } /* namespace */
67 
68 #endif /* __libardour_speakers_h__ */
virtual int add_speaker(const PBD::AngularVector &)
int set_state(const XMLNode &, int version)
void setup_default_speakers(uint32_t nspeakers)
PBD::Signal0< void > Changed
Definition: speakers.h:58
Speakers(const Speakers &)
std::vector< Speaker > _speakers
Definition: speakers.h:61
void dump_speakers(std::ostream &)
virtual void move_speaker(int id, const PBD::AngularVector &new_position)
uint32_t size() const
Definition: speakers.h:47
virtual void update()
Definition: speakers.h:63
virtual void remove_speaker(int id)
virtual void clear_speakers()
std::vector< Speaker > & speakers()
Definition: speakers.h:51
virtual ~Speakers()
XMLNode & get_state() const
Definition: xml++.h:114
#define LIBARDOUR_API