M bqaudioio/SystemAudioIO.h +8 -6
@@ 72,13 72,15 @@ public:
bool isReady() const { return isSourceReady() && isTargetReady(); }
/**
- * Enable or disable recording. Both recording and playback are
- * enabled by default; if you call enableRecordSide(false), the
- * record side may be switched off on subsequent stream resumption
- * until any following call to enableRecordSide(true). This is
- * optional, not all implementations will implement it.
+ * Suppress or re-enable recording. By default both recording and
+ * playback are enabled, and an active stream will be duplex. A
+ * call to suppressRecordSide(true) may be used to hint that the
+ * record side should remain closed until any following call to
+ * suppressRecordSide(false). These calls should be made while the
+ * stream is suspended. This is only a hint; not all
+ * implementations will implement it.
*/
- virtual void enableRecordSide(bool enable) = 0;
+ virtual void suppressRecordSide(bool suppress) = 0;
protected:
SystemAudioIO(ApplicationRecordTarget *target,
M src/JACKAudioIO.h +2 -0
@@ 66,6 66,8 @@ public:
void suspend() override {}
void resume() override {}
+ void suppressRecordSide(bool) override {}
+
double getCurrentTime() const override;
std::string getStartupErrorString() const { return m_startupError; }
M src/PortAudioIO.cpp +2 -1
@@ 504,8 504,9 @@ PortAudioIO::closeStream()
}
void
-PortAudioIO::enableRecordSide(bool enabled)
+PortAudioIO::suppressRecordSide(bool suppress)
{
+ bool enabled = !suppress;
if (enabled == m_recordEnabled) {
return;
}
M src/PortAudioIO.h +1 -1
@@ 70,7 70,7 @@ public:
virtual void suspend() override;
virtual void resume() override;
- virtual void enableRecordSide(bool) override;
+ virtual void suppressRecordSide(bool) override;
std::string getStartupErrorString() const { return m_startupError; }
M src/PulseAudioIO.h +2 -0
@@ 76,6 76,8 @@ public:
void suspend() override;
void resume() override;
+ void suppressRecordSide(bool) override {}
+
std::string getStartupErrorString() const { return m_startupError; }
protected: