Add API to AudioBackend for choosing between portaudio blocking or callback API
authorTim Mayberry <mojofunk@gmail.com>
Fri, 5 Feb 2016 13:27:40 +0000 (23:27 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Thu, 11 Feb 2016 02:15:07 +0000 (12:15 +1000)
libs/ardour/ardour/audio_backend.h

index 379eae9fd90da07425be93dfda47d2a1941bbc7b..d5c53b46824f43ea574d9d0ab765a71bb91de7e7 100644 (file)
@@ -258,6 +258,23 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
         */
        virtual bool update_devices () { return false; }
 
+       /**
+        * @return true if backend supports a blocking or buffered mode, false by
+        * default unless implemented by a derived class.
+        */
+       virtual bool can_use_buffered_io () { return false; }
+
+       /**
+        * Set the backend to use a blocking or buffered I/O mode
+        */
+       virtual void set_use_buffered_io (bool) { }
+
+       /**
+        * @return Set the backend to use a blocking or buffered I/O mode, false by
+        * default unless implemented by a derived class.
+        */
+       virtual bool get_use_buffered_io () { return false; }
+
     /** Returns a collection of float identifying sample rates that are
      * potentially usable with the hardware identified by @param device.
      * Any of these values may be supplied in other calls to this backend