mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-27 15:38:19 +01:00
clean up VST debugging output
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4861 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
40f3cac2d5
commit
65c3f4c88c
5 changed files with 7 additions and 24 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue