These may change as support for callback API is added
return 0;
}
+bool
+PortAudioBackend::engine_halted ()
+{
+ return !_active && _run;
+}
+
+bool
+PortAudioBackend::running ()
+{
+ return _active || _run;
+}
+
int
PortAudioBackend::_start (bool for_latency_measurement)
{
- if (!_active && _run) {
- // recover from 'halted', reap threads
+ if (engine_halted()) {
stop();
}
- if (_active || _run) {
- DEBUG_AUDIO("Already active.\n");
+ if (running()) {
+ DEBUG_AUDIO("Already started.\n");
return -1;
}
void process_incoming_midi ();
void process_outgoing_midi ();
+ bool engine_halted ();
+ bool running ();
+
private:
std::string _instance_name;
PortAudioIO *_pcmio;