Clean up audio passing round a bit.
[dcpomatic.git] / src / lib / j2k_wav_encoder.h
index 87068ad3df05c4e1592f2e352f0ee4b11b05a1d4..2c18a5730700acb69fad2bbf2aab4750ea791899 100644 (file)
@@ -39,6 +39,7 @@ class DCPVideoFrame;
 class Image;
 class Log;
 class Subtitle;
+class AudioBuffers;
 
 /** @class J2KWAVEncoder
  *  @brief An encoder which writes JPEG2000 and WAV files.
@@ -51,12 +52,12 @@ public:
 
        void process_begin (int64_t audio_channel_layout, AVSampleFormat audio_sample_format);
        void process_video (boost::shared_ptr<Image>, int, boost::shared_ptr<Subtitle>);
-       void process_audio (uint8_t *, int);
+       void process_audio (boost::shared_ptr<const AudioBuffers>);
        void process_end ();
 
 private:
 
-       void write_audio (uint8_t* data, int size);
+       void write_audio (boost::shared_ptr<const AudioBuffers> audio) const;
        void encoder_thread (ServerDescription *);
        void close_sound_files ();
        void terminate_worker_threads ();
@@ -66,8 +67,6 @@ private:
 #endif 
 
        std::vector<SNDFILE*> _sound_files;
-       int _deinterleave_buffer_size;
-       uint8_t* _deinterleave_buffer;
 
        bool _process_end;
        std::list<boost::shared_ptr<DCPVideoFrame> > _queue;