#include <gtkmm/checkbutton.h>
#include <iostream>
-
+#include <cmath>
PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
: _min_dB(-12.0),
}
*/
- if (isinf(power)) {
+ if (std::isinf(power)) {
if (power < 0) {
power = _min_dB - 1.0;
} else {
power = _max_dB - 1.0;
}
- } else if (isnan(power)) {
+ } else if (std::isnan(power)) {
power = _min_dB - 1.0;
}
class ExportChannel
{
public:
+
+ virtual ~ExportChannel () {}
+
virtual void read (Sample * data, nframes_t frames) const = 0;
virtual bool empty () const = 0;
PortExportChannel () {}
- virtual void read (Sample * data, nframes_t frames) const;
- virtual bool empty () const { return ports.empty(); }
+ void read (Sample * data, nframes_t frames) const;
+ bool empty () const { return ports.empty(); }
- virtual void get_state (XMLNode * node) const;
- virtual void set_state (XMLNode * node, Session & session);
+ void get_state (XMLNode * node) const;
+ void set_state (XMLNode * node, Session & session);
- virtual bool operator< (ExportChannel const & other) const;
+ bool operator< (ExportChannel const & other) const;
void add_port (AudioPort * port) { ports.insert (port); }
PortSet const & get_ports () { return ports; }
friend class RegionExportChannelFactory;
public:
- virtual void read (Sample * data, nframes_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
- virtual void get_state (XMLNode * node) const {};
- virtual void set_state (XMLNode * node, Session & session) {};
- virtual bool empty () const { return false; }
+ void read (Sample * data, nframes_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
+ void get_state (XMLNode * node) const {};
+ void set_state (XMLNode * node, Session & session) {};
+ bool empty () const { return false; }
// Region export should never have duplicate channels, so there need not be any semantics here
- virtual bool operator< (ExportChannel const & other) const { return this < &other; }
+ bool operator< (ExportChannel const & other) const { return this < &other; }
private:
template <typename T>
class SndfileWriter : public SndfileWriterBase, public GraphSink<T>
{
- protected:
+ // FIXME: having this protected doesn't work with Apple's gcc
// Should only be created vie ExportFileFactory and derived classes
+ public: // protected
friend class ExportFileFactory;
SndfileWriter (int channels, nframes_t samplerate, int format, string const & path);
typedef boost::shared_ptr<SndfileWriter<int> > IntWriterPtr;
typedef boost::shared_ptr<SndfileWriter<float> > FloatWriterPtr;
- FilePair ret;
-
int real_format = format->format_id() | format->sample_format() | format->endianness();
uint32_t data_width = sndfile_data_width (real_format);
return std::make_pair (boost::static_pointer_cast<FloatSink> (sfc), boost::static_pointer_cast<ExportFileWriter> (sfw));
- } else {
-
- FloatConverterPtr sfc = FloatConverterPtr (new SampleFormatConverter<float> (channels, format->dither_type(), data_width));
- FloatWriterPtr sfw = FloatWriterPtr (new SndfileWriter<float> (channels, format->sample_rate(), real_format, filename));
- sfc->pipe_to (sfw);
-
- return std::make_pair (boost::static_pointer_cast<FloatSink> (sfc), boost::static_pointer_cast<ExportFileWriter> (sfw));;
}
+
+ FloatConverterPtr sfc = FloatConverterPtr (new SampleFormatConverter<float> (channels, format->dither_type(), data_width));
+ FloatWriterPtr sfw = FloatWriterPtr (new SndfileWriter<float> (channels, format->sample_rate(), real_format, filename));
+ sfc->pipe_to (sfw);
+
+ return std::make_pair (boost::static_pointer_cast<FloatSink> (sfc), boost::static_pointer_cast<ExportFileWriter> (sfw));
}
bool
_capacity = size;
#ifdef NO_POSIX_MEMALIGN
- _events = (Evoral::Event *) malloc(sizeof(Evoral::Event) * _capacity);
+ _events = (Evoral::MIDIEvent *) malloc(sizeof(Evoral::MIDIEvent) * _capacity);
_data = (uint8_t *) malloc(sizeof(uint8_t) * _capacity * MAX_EVENT_SIZE);
#else
posix_memalign((void**)&_events, CPU_CACHE_ALIGN, sizeof(Evoral::Event) * _capacity);
libraries['sigc2'],
libraries['glibmm2'],
libraries['xml'],
- libraries['pbd'],
+ libraries['pbd'],
+ libraries['boost']
])
if evoral['IS_OSX']:
libraries['xml'],
libraries['uuid'],
libraries['glibmm2'],
- libraries['glib2'] ])
+ libraries['glib2'],
+ libraries['boost'] ])
pbd.VersionBuild(['version.cc','pbd/version.h'], [])
]
)
+if env['IS_OSX']:
+ taglib.Append (LINKFLAGS= [ "-lz" ] )
#conf = Configure(taglib)
#taglib = conf.finish ()