X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_channel.h;h=8f4d8fc27cf3e47dd8bfe459c9af8d247ed125aa;hb=e5a181c323243a03338f5a9934a5df254986370d;hp=894406874e40ec8b1e249be71c4e7ba80ba26718;hpb=5792674ca4d02e093b4318d31a117a47ae72ecdf;p=ardour.git diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index 894406874e..8f4d8fc27c 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -22,11 +22,13 @@ #define __ardour_export_channel_h__ #include +#include #include #include #include "pbd/signals.h" +#include "pbd/ringbuffer.h" #include "ardour/buffer_set.h" #include "ardour/export_pointers.h" @@ -46,9 +48,9 @@ class LIBARDOUR_API ExportChannel : public boost::less_than_comparable > PortSet; PortExportChannel (); - void set_max_buffer_size(framecnt_t frames); + ~PortExportChannel (); - void read (Sample const *& data, framecnt_t frames) const; + void set_max_buffer_size(samplecnt_t samples); + + void read (Sample const *& data, samplecnt_t samples) const; bool empty () const { return ports.empty(); } void get_state (XMLNode * node) const; @@ -83,8 +87,9 @@ class LIBARDOUR_API PortExportChannel : public ExportChannel private: PortSet ports; - boost::scoped_array buffer; - framecnt_t buffer_size; + samplecnt_t _buffer_size; + boost::scoped_array _buffer; + std::list > > _delaylines; }; @@ -103,23 +108,23 @@ class LIBARDOUR_API RegionExportChannelFactory ~RegionExportChannelFactory (); ExportChannelPtr create (uint32_t channel); - void read (uint32_t channel, Sample const *& data, framecnt_t frames_to_read); + void read (uint32_t channel, Sample const *& data, samplecnt_t samples_to_read); private: - int new_cycle_started (framecnt_t) { buffers_up_to_date = false; return 0; } - void update_buffers (framecnt_t frames); + int new_cycle_started (samplecnt_t) { buffers_up_to_date = false; return 0; } + void update_buffers (samplecnt_t samples); AudioRegion const & region; AudioTrack & track; Type type; - framecnt_t frames_per_cycle; + samplecnt_t samples_per_cycle; size_t n_channels; BufferSet buffers; bool buffers_up_to_date; - framecnt_t region_start; - framecnt_t position; + samplecnt_t region_start; + samplecnt_t position; boost::scoped_array mixdown_buffer; boost::scoped_array gain_buffer; @@ -133,7 +138,7 @@ class LIBARDOUR_API RegionExportChannel : public ExportChannel friend class RegionExportChannelFactory; public: - void read (Sample const *& data, framecnt_t frames_to_read) const { factory.read (channel, data, frames_to_read); } + void read (Sample const *& data, samplecnt_t samples_to_read) const { factory.read (channel, data, samples_to_read); } void get_state (XMLNode * /*node*/) const {}; void set_state (XMLNode * /*node*/, Session & /*session*/) {}; bool empty () const { return false; } @@ -164,9 +169,9 @@ class LIBARDOUR_API RouteExportChannel : public ExportChannel static void create_from_route(std::list & result, boost::shared_ptr route); public: // ExportChannel interface - void set_max_buffer_size(framecnt_t frames); + void set_max_buffer_size(samplecnt_t samples); - void read (Sample const *& data, framecnt_t frames) const; + void read (Sample const *& data, samplecnt_t samples) const; bool empty () const { return false; } void get_state (XMLNode * node) const;