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>
8namespace Protocols
9{
10inline 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}
Definition score-plugin-protocols/Protocols/Settings/Model.hpp:19
T & settings() const
Access a specific Settings model instance.
Definition ApplicationContext.hpp:40