Fix sketchy casts.
[ardour.git] / libs / ardour / ardour / export_processor.h
index fdb8213c68bad10c6fdbd6d993c9248f490b3797..c2cb5034c75db39dd45a8894da653d146101a7d0 100644 (file)
 #include <boost/smart_ptr.hpp>
 #include <glibmm/ustring.h>
 
-#include <ardour/graph.h>
-#include <ardour/export_file_io.h>
-#include <ardour/export_utilities.h>
-
-using Glib::ustring;
-using std::list;
+#include "ardour/graph.h"
+#include "ardour/export_file_io.h"
+#include "ardour/export_utilities.h"
 
 namespace ARDOUR
 {
@@ -46,30 +43,22 @@ class ExportProcessor
 {
   private:
        /* Typedefs for utility processors */
-       
+
        typedef boost::shared_ptr<SampleRateConverter> SRConverterPtr;
        typedef boost::shared_ptr<PeakReader> PReaderPtr;
        typedef boost::shared_ptr<Normalizer> NormalizerPtr;
        typedef boost::shared_ptr<ExportTempFile> TempFilePtr;
-       
-       typedef boost::shared_ptr<SampleFormatConverter<short> > ShortConverterPtr;
-       typedef boost::shared_ptr<SampleFormatConverter<int> > IntConverterPtr;
-       typedef boost::shared_ptr<SampleFormatConverter<float> > FloatConverterPtr;
-       
-       typedef boost::shared_ptr<SndfileWriter<short> > ShortWriterPtr;
-       typedef boost::shared_ptr<SndfileWriter<int> > IntWriterPtr;
-       typedef boost::shared_ptr<SndfileWriter<float> > FloatWriterPtr;
-       
+
        typedef GraphSink<float> FloatSink;
        typedef boost::shared_ptr<FloatSink> FloatSinkPtr;
        typedef std::vector<FloatSinkPtr> FloatSinkVect;
-       
+
        typedef boost::shared_ptr<ExportFilename> FilenamePtr;
        typedef boost::shared_ptr<ExportFormatSpecification const> FormatPtr;
-       
+
        typedef boost::shared_ptr<ExportFileWriter> FileWriterPtr;
        typedef std::list<FileWriterPtr> FileWriterList;
-       
+
   public:
 
        ExportProcessor (Session & session);
@@ -81,28 +70,27 @@ class ExportProcessor
         * @return 0 on success
         */
        int prepare (FormatPtr format, FilenamePtr fname, uint32_t chans, bool split = false, nframes_t start = 0);
-       
+
        /// Process data
        /** @param frames frames to process @return frames written **/
        nframes_t process (float * data, nframes_t frames);
-       
+
        /** should be called after all data is given to process **/
        void prepare_post_processors ();
-       
+
        void write_files ();
-       
+
        static sigc::signal<void, Glib::ustring> WritingFile;
-       
+
   private:
-       
+
        void reset ();
-       FloatSinkPtr prepare_sndfile_writer (FormatPtr format, uint32_t channels, ustring const & filename);
-       
-       Session &        session;
-       ExportStatus &   status;
-       
+
+       Session &                       session;
+       boost::shared_ptr<ExportStatus> status;
+
        /* these are initalized in prepare() */
-       
+
        FilenamePtr      filename;
        NormalizerPtr    normalizer;
        SRConverterPtr   src;
@@ -110,15 +98,15 @@ class ExportProcessor
        TempFilePtr      temp_file;
        FloatSinkVect    file_sinks;
        FileWriterList   writer_list;
-       
+
        /* general info */
-       
+
        uint32_t         channels;
        nframes_t        blocksize;
        nframes_t        frame_rate;
-       
+
        /* Processing */
-       
+
        bool             tag;
        bool             broadcast_info;
        bool             split_files;
@@ -127,9 +115,9 @@ class ExportProcessor
        bool             trim_end;
        nframes_t        silence_beginning;
        nframes_t        silence_end;
-       
+
        /* Progress info */
-       
+
        nframes_t        temp_file_position;
        nframes_t        temp_file_length;
 };