projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix build.
[dcpomatic.git]
/
src
/
lib
/
audio_mapping.h
diff --git
a/src/lib/audio_mapping.h
b/src/lib/audio_mapping.h
index 7d76e4f5a0643066285086522cd66d12d81ceaea..f3096764c79c248ddb3bb0a0519efbd6caaa9f8f 100644
(file)
--- a/
src/lib/audio_mapping.h
+++ b/
src/lib/audio_mapping.h
@@
-1,5
+1,3
@@
-/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */
-
/*
Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
/*
Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
@@
-22,8
+20,8
@@
#ifndef DCPOMATIC_AUDIO_MAPPING_H
#define DCPOMATIC_AUDIO_MAPPING_H
#ifndef DCPOMATIC_AUDIO_MAPPING_H
#define DCPOMATIC_AUDIO_MAPPING_H
-#include <
list
>
-#include <
lib
dcp/types.h>
+#include <
vector
>
+#include <dcp/types.h>
#include <boost/shared_ptr.hpp>
namespace xmlpp {
#include <boost/shared_ptr.hpp>
namespace xmlpp {
@@
-34,27
+32,36
@@
namespace cxml {
class Node;
}
class Node;
}
+/** 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 are mapped to each DCP channel
+ * by a linear gain.
+ */
class AudioMapping
{
public:
AudioMapping ();
AudioMapping (int);
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 as_xml (xmlpp::Node *) const;
- void add (int, libdcp::Channel);
-
- 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 make_default ();
-
std::list<int> content_channels () const
;
-
std::list<libdcp::Channel> content_to_dcp (int
) const;
+
void set (int, dcp::Channel, float)
;
+
float get (int, dcp::Channel
) const;
+ int content_channels () const {
+ return _content_channels;
+ }
+
private:
private:
- std::list<std::pair<int, libdcp::Channel> > _content_to_dcp;
+ void setup (int);
+
+ int _content_channels;
+ std::vector<std::vector<float> > _gain;
};
#endif
};
#endif