Merge master.
[dcpomatic.git] / src / lib / util.h
index d91a6b435d55843522d538657a544314f98bb7ca..579b1c231bf144874af2aa6fcc78b239e419dbe3 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
 #undef check
 
 /** The maximum number of audio channels that we can cope with */
-#define MAX_AUDIO_CHANNELS 8
+#define MAX_AUDIO_CHANNELS 12
 
 #define DCPOMATIC_HELLO "Boys, you gotta learn not to talk to nuns that way"
 
@@ -141,6 +141,24 @@ private:
        char* _old;
 };
 
+class ScopedTemporary
+{
+public:
+       ScopedTemporary ();
+       ~ScopedTemporary ();
+
+       boost::filesystem::path file () const {
+               return _file;
+       }
+       
+       char const * c_str () const;
+       FILE* open (char const *);
+       void close ();
+
+private:
+       boost::filesystem::path _file;
+       FILE* _open;
+};
 
 #endif