From aa473d19780f2670bb828835ee7ce970571016cf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 16:04:14 +0000 Subject: Strip trailing whitespace. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1999 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/InternalTransport.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/engine/InternalTransport.cpp') diff --git a/src/engine/InternalTransport.cpp b/src/engine/InternalTransport.cpp index 35eaa53a..5478682b 100644 --- a/src/engine/InternalTransport.cpp +++ b/src/engine/InternalTransport.cpp @@ -1,15 +1,15 @@ /* This file is part of Ingen. * Copyright (C) 2007 Dave Robillard - * + * * Ingen is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -44,15 +44,15 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par OutputPort* bpb_port = new OutputPort(this, "Beats per Bar", 1, 1, // new PortInfo("Beats per Bar", CONTROL, OUTPUT, 0, 0, 1), 1); _ports.at(1) = bpb_port; - + OutputPort* bar_port = new OutputPort(this, "Bar", 3, 1, // new PortInfo("Bar", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(2) = bar_port; - + OutputPort* beat_port = new OutputPort(this, "Beat", 3, 1, // new PortInfo("Beat", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(3) = beat_port; - + OutputPort* frame_port = new OutputPort(this, "Frame", 3, 1, // new PortInfo("Frame", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(4) = frame_port; @@ -60,7 +60,7 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par OutputPort* hour_port = new OutputPort(this, "Hour", 3, 1, // new PortInfo("Hour", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(5) = hour_port; - + OutputPort* minute_port = new OutputPort(this, "Minute", 3, 1, // new PortInfo("Minute", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(6) = minute_port; @@ -68,7 +68,7 @@ TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* par OutputPort* second_port = new OutputPort(this, "Second", 3, 1, // new PortInfo("Second", CONTROL, OUTPUT, 0, 0, 1), buffer_size); _ports.at(7) = second_port; - + OutputPort* trg_port = new OutputPort(this, "Beat Tick", 2, 1, // new PortInfo("Beat Tick", AUDIO, OUTPUT, 0, 0, 1), buffer_size); _ports.at(8) = trg_port; @@ -92,10 +92,10 @@ TransportNode::process(ProcessContext& context) double bpm = position->beats_per_minute; float bpb = position->beats_per_bar; float spb = 60.0 / bpm; - + //cerr << "bpm = " << bpm << endl; - //cerr << "spb = " << spb << endl; - + //cerr << "spb = " << spb << endl; + if (position->valid & JackPositionBBT) { cerr << "bar: " << position->bar << endl; cerr << "beat: " << position->beat << endl; @@ -121,14 +121,14 @@ TransportNode::process(ProcessContext& context) cerr << "No timecode." << endl; } - + ((OutputPort*)_ports.at(0))->buffer(0)->set(spb, 0, 0); ((OutputPort*)_ports.at(1))->buffer(0)->set(bpb, 0, 0); - + // fill the trigger buffers with zeros ((OutputPort*)_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1); ((OutputPort*)_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1); - + // if the transport is rolling, add triggers at the right frame positions if ((position->valid & JackTransportBBT) && (state == JackTransportRolling)) { double frames_per_beat = position->frame_rate * spb; @@ -147,7 +147,7 @@ TransportNode::process(ProcessContext& context) } } #endif - + NodeBase::post_process(context); } -- cgit v1.2.1