#include <boost/shared_ptr.hpp>
-#include <midi++/mmc.h>
-#include <midi++/port.h>
-#include <midi++/manager.h>
-#include <pbd/error.h>
+#include "midi++/mmc.h"
+#include "midi++/port.h"
+#include "midi++/manager.h"
+#include "pbd/error.h"
#include <glibmm/thread.h>
-#include <pbd/pthread_utils.h>
-
-#include <ardour/configuration.h>
-#include <ardour/audioengine.h>
-#include <ardour/session.h>
-#include <ardour/audio_track.h>
-#include <ardour/midi_track.h>
-#include <ardour/audio_diskstream.h>
-#include <ardour/slave.h>
-#include <ardour/cycles.h>
-#include <ardour/smpte.h>
+#include "pbd/pthread_utils.h"
+
+#include "ardour/configuration.h"
+#include "ardour/audioengine.h"
+#include "ardour/session.h"
+#include "ardour/audio_track.h"
+#include "ardour/midi_track.h"
+#include "ardour/audio_diskstream.h"
+#include "ardour/slave.h"
+#include "ardour/cycles.h"
+#include "ardour/smpte.h"
#include "i18n.h"
}
int
-Session::set_midi_port (string port_tag)
+Session::set_midi_port (string /*port_tag*/)
{
#if 0
if (port_tag.length() == 0) {
}
void
-Session::spp_start (Parser& ignored, nframes_t timestamp)
+Session::spp_start (Parser &, nframes_t /*timestamp*/)
{
if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) {
request_transport_speed (1.0);
}
void
-Session::spp_stop (Parser& ignored, nframes_t timestamp)
+Session::spp_stop (Parser&, nframes_t /*timestamp*/)
{
if (Config->get_mmc_control()) {
request_stop ();
*/
void
-Session::mmc_deferred_play (MIDI::MachineControl &mmc)
+Session::mmc_deferred_play (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) {
request_transport_speed (1.0);
}
void
-Session::mmc_record_pause (MIDI::MachineControl &mmc)
+Session::mmc_record_pause (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
maybe_enable_record();
}
void
-Session::mmc_record_strobe (MIDI::MachineControl &mmc)
+Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
{
if (!Config->get_mmc_control())
return;
}
void
-Session::mmc_record_exit (MIDI::MachineControl &mmc)
+Session::mmc_record_exit (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
disable_record (false);
}
void
-Session::mmc_stop (MIDI::MachineControl &mmc)
+Session::mmc_stop (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
request_stop ();
}
void
-Session::mmc_pause (MIDI::MachineControl &mmc)
+Session::mmc_pause (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
static bool step_queued = false;
void
-Session::mmc_step (MIDI::MachineControl &mmc, int steps)
+Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps)
{
if (!Config->get_mmc_control()) {
return;
}
void
-Session::mmc_rewind (MIDI::MachineControl &mmc)
+Session::mmc_rewind (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
request_transport_speed(-8.0f);
}
void
-Session::mmc_fast_forward (MIDI::MachineControl &mmc)
+Session::mmc_fast_forward (MIDI::MachineControl &/*mmc*/)
{
if (Config->get_mmc_control()) {
request_transport_speed(8.0f);
}
void
-Session::mmc_locate (MIDI::MachineControl &mmc, const MIDI::byte* mmc_tc)
+Session::mmc_locate (MIDI::MachineControl &/*mmc*/, const MIDI::byte* mmc_tc)
{
if (!Config->get_mmc_control()) {
return;
}
void
-Session::mmc_shuttle (MIDI::MachineControl &mmc, float speed, bool forw)
+Session::mmc_shuttle (MIDI::MachineControl &/*mmc*/, float speed, bool forw)
{
if (!Config->get_mmc_control()) {
return;
* This resets the MTC code, the next quarter frame message that is sent will be
* the first one with the beginning of this cycle as the new start point.
*/
-
int
-Session::send_full_time_code(nframes_t nframes)
+Session::send_full_time_code(nframes_t /*nframes*/)
{
/* This function could easily send at a given frame offset, but would
* that be useful? Does ardour do sub-block accurate locating? [DR] */
// I don't understand this bit yet.. [DR]
if (((mtc_smpte_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_smpte_time.frames % 2)) {
// start MTC quarter frame transmission on an even frame
- SMPTE::increment( transmitting_smpte_time );
+ SMPTE::increment( transmitting_smpte_time, config.get_subframes_per_frame() );
outbound_mtc_smpte_frame += (nframes_t) _frames_per_smpte_frame;
}
return 0;
}
-
-/** Sends MTC (quarter-frame) messages for this cycle.
+/** Send MTC (quarter-frame) messages for this cycle.
* Must be called exactly once per cycle from the audio thread. Realtime safe.
* This function assumes the state of full SMPTE is sane, eg. the slave is
* expecting quarter frame messages and has the right frame of reference (any
// Wrap quarter frame counter
next_quarter_frame_to_send = 0;
// Increment smpte time twice
- SMPTE::increment( transmitting_smpte_time );
- SMPTE::increment( transmitting_smpte_time );
+ SMPTE::increment( transmitting_smpte_time, config.get_subframes_per_frame() );
+ SMPTE::increment( transmitting_smpte_time, config.get_subframes_per_frame() );
// Re-calculate timing of first quarter frame
//smpte_to_sample( transmitting_smpte_time, outbound_mtc_smpte_frame, true /* use_offset */, false );
outbound_mtc_smpte_frame += 8 * quarter_frame_duration;
bool restart;
vector<MIDI::Port*> ports;
- PBD::ThreadCreatedWithRequestSize (pthread_self(), X_("MIDI"), 2048);
+ PBD::notify_gui_about_thread_creation (pthread_self(), X_("MIDI"), 2048);
memset (&rtparam, 0, sizeof (rtparam));
rtparam.sched_priority = 9; /* XXX should be relative to audio (JACK) thread */
pfd[nfds].fd = _mmc_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _mmc_port;
+ //cerr << "MIDI port " << nfds << " = MMC @ " << _mmc_port << endl;
nfds++;
}
pfd[nfds].fd = _mtc_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _mtc_port;
+ //cerr << "MIDI port " << nfds << " = MTC @ " << _mtc_port << endl;
nfds++;
}
pfd[nfds].fd = _midi_port->selectable();
pfd[nfds].events = POLLIN|POLLHUP|POLLERR;
ports[nfds] = _midi_port;
+ // cerr << "MIDI port " << nfds << " = MIDI @ " << _midi_port << endl;
nfds++;
}