change Audio backend sample time methods to use a 64 bit timeline
[ardour.git] / libs / ardour / ardour / audio_backend.h
index bf860e9aebbfb1bd79f405aefe1dfdb647bfc820..e0e7d8e90404efc02ddbd32f28e3e7c5e5636d23 100644 (file)
@@ -70,6 +70,14 @@ struct LIBARDOUR_API AudioBackendInfo {
      * not currently required, is still possible.
      */
     bool (*already_configured)();
+
+    /** Return true if the underlying mechanism/API can be
+     * used on the given system.
+     *
+     * If this function returns false, the backend is not
+     * listed in the engine dialog.
+     */
+    bool (*available)();
 };
 
 class LIBARDOUR_API AudioBackend : public PortEngine {
@@ -178,7 +186,7 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
      * if there is any chance that a buffer size of 1024 is not in the list
      * returned by available_buffer_sizes()
      */
-    virtual uint32_t default_buffer_size () const {
+    virtual uint32_t default_buffer_size (const std::string& device) const {
            return 1024;
     }
 
@@ -225,7 +233,7 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
     virtual int set_device_name (const std::string&) = 0;
     /** Deinitialize and destroy current device
      */
-    virtual int drop_device() { return 0; };
+       virtual int drop_device() {return 0;};
     /** Set the sample rate to be used
      */
     virtual int set_sample_rate (float) = 0;
@@ -386,6 +394,12 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
      */
     virtual int stop () = 0;
 
+        /** Reset device. 
+     *
+     * Return zero if successful, negative values on error
+     */
+       virtual int reset_device() = 0;
+
     /** While remaining connected to the device, and without changing its
      * configuration, start (or stop) calling the process_callback() of @param engine
      * without waiting for the device. Once process_callback() has returned, it
@@ -463,12 +477,12 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
      *
      * Can be called from any thread.
      */
-    virtual pframes_t sample_time () = 0;
+    virtual framepos_t sample_time () = 0;
 
     /** Return the time according to the sample clock in use when the most
      * recent buffer process cycle began. Can be called from any thread.
      */
-    virtual pframes_t sample_time_at_cycle_start () = 0;
+    virtual framepos_t sample_time_at_cycle_start () = 0;
 
     /** Return the time since the current buffer process cycle started,
      * in samples, according to the sample clock in use.