summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2009-12-06 04:35:48 +0000
committerTaybin Rutkin <taybin@taybin.com>2009-12-06 04:35:48 +0000
commit3fdcba185980896366cc0d3d14f6dfd6bbaf1d0a (patch)
tree65226b3a1077c0949b1c72c1222a0bb9312def8d /libs/ardour
parent4a8baf26f19a2658e6de947b76a6bd843cbdae3d (diff)
Merged revisions 6293,6296-6306,6308 via svnmerge from
svn+ssh://ardoursvn@subversion.ardour.org/ardour2/branches/build_fixes ........ r6293 | trutkin | 2009-12-05 08:49:37 -0500 (Sat, 05 Dec 2009) | 2 lines fix if-statement in build script ........ r6296 | trutkin | 2009-12-05 09:30:19 -0500 (Sat, 05 Dec 2009) | 5 lines rearrange GTKOSX and darwin dependencies - moved some GTKOSX include paths to generic darwin - made GTKOSX dependent on being on darwin anyways ........ r6297 | trutkin | 2009-12-05 09:35:09 -0500 (Sat, 05 Dec 2009) | 2 lines move coreaudio and audiounit handling to darwin section ........ r6298 | trutkin | 2009-12-05 09:53:40 -0500 (Sat, 05 Dec 2009) | 3 lines use True/False instead of 1/0 fix another if-statement where it should be an elif-statement ........ r6299 | trutkin | 2009-12-05 14:11:09 -0500 (Sat, 05 Dec 2009) | 10 lines fixes to get libardour building - can't cast away volatile, so copy _transport_frame before emitting it. - const_reverse_iterator::operator!=() isn't defined in this version of gcc. - removed annoying HERE WE ARE CAAudioFile.h #warning. - removed unnecessary include of sndfile.h in session.h. - we don't want to set -march=i686 on the mac, so indent this if-statement so it's only run on linux. - DEBUG_STR() fails in the NDEBUG case, so wrap its use in an #ifndef NDEBUG ........ r6300 | trutkin | 2009-12-05 15:48:29 -0500 (Sat, 05 Dec 2009) | 2 lines remove old scons-style CXXFLAGS_FOO in favor of just CXXFLAGS ........ r6301 | trutkin | 2009-12-05 16:01:10 -0500 (Sat, 05 Dec 2009) | 8 lines clean up configure flags - removed useless --aubio and --syslibs flags. The syslibs value is ignored as we don't bring our own libraries with us anymoreand we use aubio automatically if it's available - added ways to turn off fpu_optimization and NLS - fixed compiling on the mac without fpu_optimization ........ r6302 | trutkin | 2009-12-05 18:12:46 -0500 (Sat, 05 Dec 2009) | 5 lines go back to prior uselib method for COREAUDIO, AUDIOUNIT, and GTKOSX - fixed compile of CoreAudioSource - re-did inclusion of coremidi_midiport.cc to depend on COREAUDIO presence ........ r6303 | trutkin | 2009-12-05 18:59:02 -0500 (Sat, 05 Dec 2009) | 5 lines fixed compiler warnings about classes with virtual member functions, but no virtual destructor. - Changed Metering to not use foo() = 0; to indicate it shouldn't be instantiated, but private: Metering(), which is more idiomatic. ........ r6304 | trutkin | 2009-12-05 19:25:41 -0500 (Sat, 05 Dec 2009) | 2 lines TOP_MENUBAR isn't used when building ardour.menus. Removed. ........ r6305 | trutkin | 2009-12-05 19:46:11 -0500 (Sat, 05 Dec 2009) | 5 lines fix some AudioUnit compile errors - update AudioUnit to use ChanCount - fix some namespacing issues in audio_unit.h ........ r6306 | trutkin | 2009-12-05 20:08:48 -0500 (Sat, 05 Dec 2009) | 2 lines make --extra-warn useful ........ r6308 | trutkin | 2009-12-05 22:59:42 -0500 (Sat, 05 Dec 2009) | 10 lines fix compiling/linking with --coreaudio - rearrange ardour_ui.h header in editor.cc to avoid conflict - midi++ depends on OSX as well as COREAUDIO - fixed including frameworks - tweaked --extra-warn again. it's kinda redundent with --strict - improved indentation in wscript - use #ifdef HAVE_COREMIDI, not #if HAVE_COREMIDI. #if isn't interchangable with #ifdef and won't work if HAVE_COREMIDI is defined with no value. ........ git-svn-id: svn://localhost/ardour2/branches/3.0@6310 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/audio_unit.h22
-rw-r--r--libs/ardour/ardour/coreaudiosource.h2
-rw-r--r--libs/ardour/ardour/meter.h2
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/ardour/slave.h1
-rw-r--r--libs/ardour/audio_unit.cc12
-rw-r--r--libs/ardour/coreaudiosource.cc2
-rw-r--r--libs/ardour/session_midi.cc4
-rw-r--r--libs/ardour/session_transport.cc8
-rw-r--r--libs/ardour/source_factory.cc2
-rw-r--r--libs/ardour/tempo.cc3
-rw-r--r--libs/ardour/wscript4
12 files changed, 36 insertions, 28 deletions
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h
index d1dd92dd3d..9fbc188562 100644
--- a/libs/ardour/ardour/audio_unit.h
+++ b/libs/ardour/ardour/audio_unit.h
@@ -65,7 +65,7 @@ class AUPlugin : public ARDOUR::Plugin
AUPlugin (const AUPlugin& other);
virtual ~AUPlugin ();
- std::string unique_id () const;
+ std::string unique_id () const;
const char * label () const;
const char * name () const { return _info->name.c_str(); }
const char * maker () const { return _info->creator.c_str(); }
@@ -81,10 +81,10 @@ class AUPlugin : public ARDOUR::Plugin
void deactivate ();
void set_block_size (nframes_t nframes);
- int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
+ int connect_and_run (std::vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
std::set<uint32_t> automatable() const;
- string describe_parameter (uint32_t);
- string state_node_name () const { return "audiounit"; }
+ std::string describe_parameter (uint32_t);
+ std::string state_node_name () const { return "audiounit"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
bool parameter_is_audio (uint32_t) const;
@@ -95,16 +95,16 @@ class AUPlugin : public ARDOUR::Plugin
XMLNode& get_state();
int set_state(const XMLNode& node);
- bool save_preset (string name);
- bool load_preset (const string preset_label);
+ bool save_preset (std::string name);
+ bool load_preset (const std::string preset_label);
std::vector<std::string> get_presets ();
std::string current_preset() const;
bool has_editor () const;
int32_t can_do (int32_t in, int32_t& out);
- uint32_t output_streams() const;
- uint32_t input_streams() const;
+ ChanCount output_streams() const;
+ ChanCount input_streams() const;
int32_t configure_io (int32_t in, int32_t out);
boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
@@ -120,8 +120,8 @@ class AUPlugin : public ARDOUR::Plugin
boost::shared_ptr<CAAudioUnit> unit;
bool initialized;
- int32_t input_channels;
- int32_t output_channels;
+ ChanCount input_channels;
+ ChanCount output_channels;
std::vector<std::pair<int,int> > io_configs;
AudioBufferList* buffers;
@@ -144,7 +144,7 @@ class AUPlugin : public ARDOUR::Plugin
uint32_t current_maxbuf;
nframes_t current_offset;
nframes_t cb_offset;
- vector<Sample*>* current_buffers;
+ std::vector<Sample*>* current_buffers;
nframes_t frames_processed;
std::vector<AUParameterDescriptor> descriptors;
diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h
index c8de8304c2..f25f1b0154 100644
--- a/libs/ardour/ardour/coreaudiosource.h
+++ b/libs/ardour/ardour/coreaudiosource.h
@@ -31,7 +31,7 @@ namespace ARDOUR {
class CoreAudioSource : public AudioFileSource {
public:
CoreAudioSource (ARDOUR::Session&, const XMLNode&);
- CoreAudioSource (ARDOUR::Session&, const string& path, bool, int chn, Flag);
+ CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag);
~CoreAudioSource ();
float sample_rate() const;
diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h
index e0b956c0f9..dbaba25a06 100644
--- a/libs/ardour/ardour/meter.h
+++ b/libs/ardour/ardour/meter.h
@@ -41,7 +41,7 @@ class Metering {
private:
/* this object is not meant to be instantiated */
- virtual void foo() = 0;
+ Metering();
static Glib::StaticMutex m_meter_signal_lock;
};
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 4a5fc69be5..c9b2ba11a3 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -33,8 +33,6 @@
#include <boost/weak_ptr.hpp>
#include <boost/utility.hpp>
-#include <sndfile.h>
-
#include <glibmm/thread.h>
#include "pbd/error.h"
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index 62a52155c4..b01722e306 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -171,6 +171,7 @@ class Slave {
/// We need this wrapper for testability, it's just too hard to mock up a session class
class ISlaveSessionProxy {
public:
+ virtual ~ISlaveSessionProxy() {}
virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
virtual nframes_t frame_rate() const { return 0; }
virtual nframes64_t audible_frame () const { return 0; }
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index cb91b34cf5..a2cf0e07e9 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -364,8 +364,8 @@ AUPlugin::init ()
not potential set ups.
*/
- input_channels = -1;
- output_channels = -1;
+ input_channels = ChanCount::ZERO;
+ output_channels = ChanCount::ZERO;
if (_set_block_size (_session.get_block_size())) {
error << _("AUPlugin: cannot set processing block size") << endmsg;
@@ -848,15 +848,15 @@ AUPlugin::set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescriptio
}
if (scope == kAudioUnitScope_Input) {
- input_channels = fmt.mChannelsPerFrame;
+ input_channels.setAudio( fmt.mChannelsPerFrame );
} else {
- output_channels = fmt.mChannelsPerFrame;
+ output_channels.setAudio( fmt.mChannelsPerFrame );
}
return 0;
}
-uint32_t
+ChanCount
AUPlugin::input_streams() const
{
if (input_channels < 0) {
@@ -867,7 +867,7 @@ AUPlugin::input_streams() const
}
-uint32_t
+ChanCount
AUPlugin::output_streams() const
{
if (output_channels < 0) {
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index a4da378aa4..55e81ae9e0 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -44,7 +44,7 @@ CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node)
init_cafile ();
}
-CoreAudioSource::CoreAudioSource (Session& s, const string& path, bool, int chn, Flag flags)
+CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags)
/* files created this way are never writable or removable */
: Source (s, DataType::AUDIO, path, Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))),
AudioFileSource (s, path,
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index fe332b71c2..15777aa642 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -891,10 +891,12 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes)
return -1;
}
+#ifndef NDEBUG
DEBUG_STR_SET(foo,"sending ");
DEBUG_STR(foo) << transmitting_timecode_time;
DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send,
out_stamp));
+#endif
// Increment quarter frame counter
next_quarter_frame_to_send++;
@@ -1252,9 +1254,11 @@ Session::midi_thread_work ()
for (int p = 1; p < nfds; ++p) {
+#ifndef NDEBUG
DEBUG_STR_SET(foo, "port #%1 revents = ");
DEBUG_STR(foo) << hex << pfd[p].revents << dec << endl;
DEBUG_TRACE (DEBUG::MidiIO, string_compose (DEBUG_STR(foo).str(), p));
+#endif
if ((pfd[p].revents & ~POLLIN)) {
// error << string_compose(_("Transport: error polling MIDI port %1 (revents =%2%3%4"), p, &hex, pfd[p].revents, &dec) << endmsg;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 36e910374b..a632ae067d 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -576,7 +576,9 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
play_loop = false;
}
- PositionChanged ((nframes64_t) _transport_frame); /* EMIT SIGNAL */
+ // can't cast away volatile so copy and emit that
+ nframes64_t tframe = _transport_frame;
+ PositionChanged (tframe); /* EMIT SIGNAL */
TransportStateChange (); /* EMIT SIGNAL */
/* and start it up again if relevant */
@@ -1402,7 +1404,9 @@ Session::engine_halted ()
void
Session::xrun_recovery ()
{
- Xrun ((nframes64_t)_transport_frame); //EMIT SIGNAL
+ // can't cast away volatile so copy and emit that
+ nframes64_t tframe = _transport_frame;
+ Xrun (tframe); //EMIT SIGNAL
if (Config->get_stop_recording_on_xrun() && actively_recording()) {
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index b85f5b67a0..7c8943a4f1 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -163,7 +163,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
/* this is allowed to throw */
- Source *s = new CoreAudioSource (s, node);
+ Source *src = new CoreAudioSource (s, node);
// boost_debug_shared_ptr_mark_interesting (src, typeid(src).name());
boost::shared_ptr<Source> ret (src);
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 5616c489ff..2dc5eeaada 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1823,7 +1823,8 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
*/
const MeterSection* meter = 0;
- list<const MeterSection*>::const_reverse_iterator next_meter;
+ list<const MeterSection*>::reverse_iterator next_meter; // older versions of GCC don't
+ // support const_reverse_iterator::operator!=()
for (next_meter = meter_sections.rbegin(); next_meter != meter_sections.rend(); ++next_meter) {
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 67998ff5fb..b01260a30b 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -263,7 +263,7 @@ def build(bld):
obj.includes = ['.', '../surfaces/control_protocol', '..']
obj.name = 'libardour'
obj.target = 'ardour'
- obj.uselib = 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX'
+ obj.uselib = 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX COREAUDIO'
obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband'
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
@@ -324,7 +324,7 @@ def build(bld):
test/testrunner.cpp
'''.split()
testobj.includes = obj.includes + ['../pbd/']
- testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF'
+ testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF COREAUDIO'
testobj.uselib_local = 'libpbd libmidipp libardour'
testobj.name = 'libardour-tests'
testobj.target = 'run-tests'