diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-17 12:26:02 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-17 12:26:02 +0000 |
commit | 65c3f4c88c8f36820cd70fda21df35aef32931d9 (patch) | |
tree | a4824c857e4279a4838245c56cb5b6392187f6bd /libs/ardour | |
parent | 40f3cac2d56d0a7a8d31d9a24dc55fc766278a42 (diff) |
clean up VST debugging output
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4861 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audio_track.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_vst.cc | 7 | ||||
-rw-r--r-- | libs/ardour/vst_plugin.cc | 18 |
5 files changed, 7 insertions, 24 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 7f411be413..27d4a8a967 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -563,7 +563,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, Sample* tmpb; nframes_t transport_frame; boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream(); - + { Glib::RWLock::ReaderLock lm (redirect_lock, Glib::TRY_LOCK); if (lm.locked()) { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index fdbe81a368..e0221b53cc 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1308,8 +1308,6 @@ Session::disable_record (bool rt_context, bool force) if ((rs = (RecordState) g_atomic_int_get (&_record_status)) != Disabled) { - cerr << "disable record is doing something\n"; - if ((!Config->get_latched_record_enable () && !play_loop) || force) { g_atomic_int_set (&_record_status, Disabled); } else { diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 1a289807b3..99615a08b3 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -384,7 +384,7 @@ Session::process_with_events (nframes_t nframes) /* if an event left our state changing, do the right thing */ - if (non_realtime_work_pending()) { + if (nframes && non_realtime_work_pending()) { no_roll (nframes, offset); break; } diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index a973ce7fa9..87930d9934 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -29,7 +29,7 @@ #include "i18n.h" -#define DEBUG_CALLBACKS +#undef DEBUG_CALLBACKS #ifdef DEBUG_CALLBACKS #define SHOW_CALLBACK printf @@ -117,21 +117,16 @@ long Session::vst_callback (AEffect* effect, _timeInfo.sampleRate = session->frame_rate(); _timeInfo.flags = 0; - cerr << "pos = " << _timeInfo.samplePos << " SR = " << _timeInfo.sampleRate - << " asked for " << std::hex << value << std::dec << endl; - if (value & (kVstTempoValid)) { const Tempo& t (session->tempo_map().tempo_at (session->transport_frame())); _timeInfo.tempo = t.beats_per_minute (); _timeInfo.flags |= (kVstTempoValid); - cerr << "Tempo = " << _timeInfo.tempo << endl; } if (value & (kVstBarsValid)) { const Meter& m (session->tempo_map().meter_at (session->transport_frame())); _timeInfo.timeSigNumerator = m.beats_per_bar (); _timeInfo.timeSigDenominator = m.note_divisor (); _timeInfo.flags |= (kVstBarsValid); - cerr << "Meter = " << _timeInfo.timeSigNumerator << '/' << _timeInfo.timeSigDenominator << endl; } if (session->transport_speed() != 0.0f) { diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 20ba7fea24..e29f6dc3dd 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -70,16 +70,13 @@ VSTPlugin::VSTPlugin (AudioEngine& e, Session& session, FSTHandle* h) /* set rate and blocksize */ - cerr << name() << " dispatch effSetSampleRate\n"; _plugin->dispatcher (_plugin, effSetSampleRate, 0, 0, NULL, (float) session.frame_rate()); - cerr << name() << " dispatch effSetBlockSize\n"; _plugin->dispatcher (_plugin, effSetBlockSize, 0, session.get_block_size(), NULL, 0.0f); /* set program to zero */ - cerr << name() << " dispatch effSetProgram\n"; _plugin->dispatcher (_plugin, effSetProgram, 0, 0, NULL, 0.0f); Plugin::setup_controls (); @@ -109,7 +106,6 @@ void VSTPlugin::set_block_size (nframes_t nframes) { deactivate (); - cerr << name() << " dispatch effSetBlockSize\n"; _plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f); activate (); } @@ -154,7 +150,6 @@ VSTPlugin::get_state() void* data; long data_size; - cerr << name() << " dispatch = GetChunk\n"; if ((data_size = _plugin->dispatcher (_plugin, 23 /* effGetChunk */, 0, 0, &data, false)) == 0) { return *root; } @@ -258,7 +253,6 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) desc.min_unbound = false; desc.max_unbound = false; - cerr << name() << " dispatch ParamProps\n"; if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) { #ifdef VESTIGE_COMPLETE @@ -306,7 +300,6 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) char label[64]; label[0] = '\0'; - cerr << name() << " dispatch effGetParamName\n"; _plugin->dispatcher (_plugin, effGetParamName, which, 0, label, 0); desc.label = label; @@ -352,7 +345,6 @@ string VSTPlugin::describe_parameter (uint32_t param) { char name[64]; - cerr << this->name() << " dispatch effGetParamName\n"; _plugin->dispatcher (_plugin, effGetParamName, param, 0, name, 0); return name; } @@ -386,6 +378,10 @@ VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_ float *outs[_plugin->numOutputs]; int32_t i; + if (nframes == 0) { + warning << _("VST plugin called with zero frames - please notify Ardour developers") << endmsg; + return 0; + } for (i = 0; i < (int32_t) _plugin->numInputs; ++i) { ins[i] = bufs[min((uint32_t) in_index,maxbuf - 1)] + offset; @@ -404,12 +400,9 @@ VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_ out_index++; } - /* we already know it can support processReplacing */ - cerr << "++++++++++ " << name() << " RUN in " << pthread_self() << endl; _plugin->processReplacing (_plugin, ins, outs, nframes); - cerr << "\tdone\n"; return 0; } @@ -417,14 +410,12 @@ VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_ void VSTPlugin::deactivate () { - cerr << "\n\n\n ************ " << name() << " DEACTIVATE in " << pthread_self() << endl; _plugin->dispatcher (_plugin, effMainsChanged, 0, 0, NULL, 0.0f); } void VSTPlugin::activate () { - cerr << "\n\n\n ************ " << name() << " ACTIVATE in " << pthread_self() << endl; _plugin->dispatcher (_plugin, effMainsChanged, 0, 1, NULL, 0.0f); } @@ -476,7 +467,6 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const { char *first_nonws; - cerr << name() << " dispatch paramDisplay\n"; _plugin->dispatcher (_plugin, 7 /* effGetParamDisplay */, param, 0, buf, 0); if (buf[0] == '\0') { |