From 16835032aba094aeb7299d4bd90582d60b904974 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 5 Feb 2016 23:27:40 +1000 Subject: Add API to AudioBackend for choosing between portaudio blocking or callback API --- libs/ardour/ardour/audio_backend.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h index 379eae9fd9..d5c53b4682 100644 --- a/libs/ardour/ardour/audio_backend.h +++ b/libs/ardour/ardour/audio_backend.h @@ -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 -- cgit v1.2.3