libremidi update to v5.4.3 and added virtual midi out as default
This commit is contained in:
@@ -16,7 +16,11 @@
|
||||
#include <libremidi/backends/alsa_seq/midi_out.hpp>
|
||||
#include <libremidi/backends/alsa_seq/observer.hpp>
|
||||
|
||||
namespace libremidi::alsa_seq
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
NAMESPACE_LIBREMIDI::alsa_seq
|
||||
{
|
||||
|
||||
struct backend
|
||||
@@ -29,13 +33,16 @@ struct backend
|
||||
using midi_out_configuration = alsa_seq::output_configuration;
|
||||
using midi_observer_configuration = alsa_seq::observer_configuration;
|
||||
static const constexpr auto API = libremidi::API::ALSA_SEQ;
|
||||
static const constexpr auto name = "alsa_seq";
|
||||
static const constexpr auto display_name = "ALSA (sequencer)";
|
||||
static const constexpr std::string_view name = "alsa_seq";
|
||||
static const constexpr std::string_view display_name = "ALSA (sequencer)";
|
||||
|
||||
static inline bool available() noexcept
|
||||
{
|
||||
static const libasound& snd = libasound::instance();
|
||||
return snd.available && snd.seq.available;
|
||||
if (!snd.available || !snd.seq.available)
|
||||
return false;
|
||||
|
||||
return ::access("/dev/snd/seq", F_OK | R_OK | W_OK) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user