summaryrefslogtreecommitdiff
path: root/src/lib/audio_mapping.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-06 16:45:18 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-06 16:45:18 +0000
commit34b40f12d7eec52862999da9e4417fc8f6e0f9af (patch)
treeea24126bc477d8fddceb6c1e001d4cadb302dd06 /src/lib/audio_mapping.h
parent9314d6bdf8857bc6cd29b0596158f2d0ff787513 (diff)
Basics of per-channel audio gain.
Diffstat (limited to 'src/lib/audio_mapping.h')
-rw-r--r--src/lib/audio_mapping.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/audio_mapping.h b/src/lib/audio_mapping.h
index 9a507b550..26087bfff 100644
--- a/src/lib/audio_mapping.h
+++ b/src/lib/audio_mapping.h
@@ -20,7 +20,7 @@
#ifndef DCPOMATIC_AUDIO_MAPPING_H
#define DCPOMATIC_AUDIO_MAPPING_H
-#include <list>
+#include <vector>
#include <libdcp/types.h>
#include <boost/shared_ptr.hpp>
@@ -34,37 +34,34 @@ namespace cxml {
/** A many-to-many mapping from some content channels to DCP channels.
* The number of content channels is set on construction and fixed,
- * and then each of those content channels can be mapped to zero or
- * more DCP channels.
+ * and then each of those content channels are mapped to each DCP channel
+ * by a linear gain.
*/
class AudioMapping
{
public:
AudioMapping ();
AudioMapping (int);
- AudioMapping (boost::shared_ptr<const cxml::Node>);
+ AudioMapping (boost::shared_ptr<const cxml::Node>, int);
/* Default copy constructor is fine */
void as_xml (xmlpp::Node *) const;
- void add (int, libdcp::Channel);
void make_default ();
- std::list<int> dcp_to_content (libdcp::Channel) const;
- std::list<std::pair<int, libdcp::Channel> > content_to_dcp () const {
- return _content_to_dcp;
- }
+ void set (int, libdcp::Channel, float);
+ float get (int, libdcp::Channel) const;
int content_channels () const {
return _content_channels;
}
- std::list<libdcp::Channel> content_to_dcp (int) const;
-
private:
+ void setup (int);
+
int _content_channels;
- std::list<std::pair<int, libdcp::Channel> > _content_to_dcp;
+ std::vector<std::vector<float> > _gain;
};
#endif