score
Home
Classes
Namespaces
Files
Loading...
Searching...
No Matches
MIDIUtils.hpp
1
#pragma once
2
3
#include <Protocols/Settings/Model.hpp>
4
5
#include <score/application/GUIApplicationContext.hpp>
6
7
#include <libremidi/api.hpp>
8
namespace
Protocols
9
{
10
inline
libremidi::API getCurrentAPI()
11
{
12
auto
api
13
= score::AppContext().
settings
<
Protocols::Settings::Model
>().getMidiApiAsEnum();
14
if
(api == libremidi::API::UNSPECIFIED)
15
api = libremidi::midi1::default_api();
16
return
api;
17
}
18
19
}
Protocols::Settings::Model
Definition
score-plugin-protocols/Protocols/Settings/Model.hpp:19
score::ApplicationContext::settings
T & settings() const
Access a specific Settings model instance.
Definition
ApplicationContext.hpp:40