# HG changeset patch # User Chris Cannam # Date 1440082901 -3600 # Node ID 1a7bffbd971bb2b7ca0ab4209d7c44ad017c87de # Parent bacfe9945ce48a60a0e36e3b6ad3211d475883f7 Enable playback if audioIO found (as well as if playback target is) diff -r bacfe9945ce4 -r 1a7bffbd971b src/MainWindow.cpp --- a/src/MainWindow.cpp Thu Aug 20 15:56:11 2015 +0100 +++ b/src/MainWindow.cpp Thu Aug 20 16:01:41 2015 +0100 @@ -67,6 +67,7 @@ #include "plugin/api/dssi.h" #include +#include #include #include @@ -1378,7 +1379,7 @@ bool haveMainModel = (getMainModel() != 0); bool havePlayTarget = - (m_playTarget != 0); + (m_playTarget != 0 || m_audioIO != 0); bool haveCurrentPane = (currentPane != 0); bool haveCurrentLayer = @@ -1417,6 +1418,10 @@ emit canExportNotes(haveNotes); emit canSnapNotes(haveSelection && haveNotes); + cerr << "haveWaveform = " << haveWaveform << endl; + cerr << "haveMainModel = " << haveMainModel << endl; + cerr << "havePlayTarget = " << havePlayTarget << endl; + emit canPlayWaveform(haveWaveform && haveMainModel && havePlayTarget); emit canPlayPitch(havePitchTrack && haveMainModel && havePlayTarget); emit canPlayNotes(haveNotes && haveMainModel && havePlayTarget); @@ -2934,7 +2939,7 @@ MainWindowBase::mainModelChanged(model); - if (m_playTarget) { + if (m_playTarget || m_audioIO) { connect(m_fader, SIGNAL(valueChanged(float)), this, SLOT(mainModelGainChanged(float))); } @@ -2945,6 +2950,8 @@ { if (m_playTarget) { m_playTarget->setOutputGain(gain); + } else if (m_audioIO) { + m_audioIO->setOutputGain(gain); } }