Write BWF info on export. Fixes #3398.
[ardour.git] / libs / audiographer / audiographer / sndfile / sndfile_writer.h
index 38e1b8148cc60803d456a9a2b81d56370af1624e..a6f338487a96fd6dec37517c2b929e7e636f8dbc 100644 (file)
@@ -9,6 +9,7 @@
 #include "audiographer/sink.h"
 #include "audiographer/types.h"
 #include "audiographer/sndfile/sndfile_base.h"
+#include "audiographer/broadcast_info.h"
 
 #include "pbd/signals.h"
 
@@ -26,11 +27,15 @@ class SndfileWriter
   , public FlagDebuggable<>
 {
   public:
-       SndfileWriter (std::string const & path, int format, ChannelCount channels, nframes_t samplerate)
+       SndfileWriter (std::string const & path, int format, ChannelCount channels, nframes_t samplerate, boost::shared_ptr<BroadcastInfo> broadcast_info)
          : SndfileHandle (path, Write, format, channels, samplerate)
          , path (path)
        {
                add_supported_flag (ProcessContext<T>::EndOfInput);
+
+               if (broadcast_info) {
+                       broadcast_info->write_to_file (this);
+               }
        }
        
        virtual ~SndfileWriter () {}
@@ -79,4 +84,4 @@ class SndfileWriter
 
 } // namespace
 
-#endif // AUDIOGRAPHER_SNDFILE_WRITER_H
\ No newline at end of file
+#endif // AUDIOGRAPHER_SNDFILE_WRITER_H