X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_mapping.h;h=bac2b10b0a4b77cef32ccfe6c7bf9984d38d3462;hb=86aaba4f392c35ccf28221049f87b8cdba868777;hp=26087bfffa8f9e04924170444eea908640b6bced;hpb=34b40f12d7eec52862999da9e4417fc8f6e0f9af;p=dcpomatic.git diff --git a/src/lib/audio_mapping.h b/src/lib/audio_mapping.h index 26087bfff..bac2b10b0 100644 --- a/src/lib/audio_mapping.h +++ b/src/lib/audio_mapping.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,12 +17,17 @@ */ +/** @file src/lib/audio_mapping.h + * @brief AudioMapping class. + */ + #ifndef DCPOMATIC_AUDIO_MAPPING_H #define DCPOMATIC_AUDIO_MAPPING_H -#include -#include +#include +#include #include +#include namespace xmlpp { class Node; @@ -32,7 +37,9 @@ namespace cxml { class Node; } -/** A many-to-many mapping from some content channels to DCP channels. +/** @class AudioMapping. + * @brief 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. @@ -41,8 +48,8 @@ class AudioMapping { public: AudioMapping (); - AudioMapping (int); - AudioMapping (boost::shared_ptr, int); + AudioMapping (int channels); + AudioMapping (cxml::ConstNodePtr, int); /* Default copy constructor is fine */ @@ -50,12 +57,17 @@ public: void make_default (); - void set (int, libdcp::Channel, float); - float get (int, libdcp::Channel) const; + void set (int, dcp::Channel, float); + float get (int, dcp::Channel) const; int content_channels () const { return _content_channels; } + + std::string digest () const; + + std::list mapped_dcp_channels () const; + void unmap_all (); private: void setup (int);