summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2008-12-29 19:50:19 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2008-12-29 19:50:19 +0000
commit3d239bb9d59f555d08fd9362e9ce50de1255c633 (patch)
tree8346d16f52cdbf54d92268d6f64f60a3cdc1d925 /libs
parent22d73333c62957ec9d3ecfb47849c4e2048e2e3f (diff)
Fix some compiling warnings and errors in OS X
git-svn-id: svn://localhost/ardour2/branches/3.0@4358 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/export_channel.h23
-rw-r--r--libs/ardour/ardour/export_file_io.h3
-rw-r--r--libs/ardour/export_file_io.cc15
-rw-r--r--libs/ardour/midi_buffer.cc2
-rw-r--r--libs/evoral/SConscript3
-rw-r--r--libs/pbd/SConscript3
-rw-r--r--libs/taglib/SConscript2
7 files changed, 28 insertions, 23 deletions
diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h
index d9e39c8850..213bd2d9fa 100644
--- a/libs/ardour/ardour/export_channel.h
+++ b/libs/ardour/ardour/export_channel.h
@@ -38,6 +38,9 @@ class Session;
class ExportChannel
{
public:
+
+ virtual ~ExportChannel () {}
+
virtual void read (Sample * data, nframes_t frames) const = 0;
virtual bool empty () const = 0;
@@ -69,13 +72,13 @@ class PortExportChannel : public ExportChannel
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; }
@@ -126,12 +129,12 @@ class RegionExportChannel : public ExportChannel
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:
diff --git a/libs/ardour/ardour/export_file_io.h b/libs/ardour/ardour/export_file_io.h
index 6705b7736a..0e15981c25 100644
--- a/libs/ardour/ardour/export_file_io.h
+++ b/libs/ardour/ardour/export_file_io.h
@@ -77,8 +77,9 @@ class SndfileWriterBase : public ExportFileWriter
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);
diff --git a/libs/ardour/export_file_io.cc b/libs/ardour/export_file_io.cc
index d4aa1870ba..793b1dbea4 100644
--- a/libs/ardour/export_file_io.cc
+++ b/libs/ardour/export_file_io.cc
@@ -400,8 +400,6 @@ ExportFileFactory::create_sndfile (FormatPtr format, unsigned int channels, ustr
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);
@@ -422,14 +420,13 @@ ExportFileFactory::create_sndfile (FormatPtr format, unsigned int channels, ustr
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
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index 705b94f422..1f5b0c5fa9 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -74,7 +74,7 @@ MidiBuffer::resize (size_t size)
_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);
diff --git a/libs/evoral/SConscript b/libs/evoral/SConscript
index 29d0dfcaf9..3f901e8fd9 100644
--- a/libs/evoral/SConscript
+++ b/libs/evoral/SConscript
@@ -12,7 +12,8 @@ evoral.Merge([
libraries['sigc2'],
libraries['glibmm2'],
libraries['xml'],
- libraries['pbd'],
+ libraries['pbd'],
+ libraries['boost']
])
if evoral['IS_OSX']:
diff --git a/libs/pbd/SConscript b/libs/pbd/SConscript
index 5f2d20e405..d7981be771 100644
--- a/libs/pbd/SConscript
+++ b/libs/pbd/SConscript
@@ -60,7 +60,8 @@ pbd.Merge ([ libraries['sigc2'],
libraries['xml'],
libraries['uuid'],
libraries['glibmm2'],
- libraries['glib2'] ])
+ libraries['glib2'],
+ libraries['boost'] ])
pbd.VersionBuild(['version.cc','pbd/version.h'], [])
diff --git a/libs/taglib/SConscript b/libs/taglib/SConscript
index fed92ce0a3..d9062889b6 100644
--- a/libs/taglib/SConscript
+++ b/libs/taglib/SConscript
@@ -64,6 +64,8 @@ taglib.Append (CPPATH= [ '#libs/taglib/taglib',
]
)
+if env['IS_OSX']:
+ taglib.Append (LINKFLAGS= [ "-lz" ] )
#conf = Configure(taglib)
#taglib = conf.finish ()