* 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 {
* 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;
}
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;
*/
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
*
* 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.