dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx_midi_services.h File Reference
#include "dx_platform.h"
#include "dx_stream.h"
#include "dx_midi.h"
#include <unknwn.h>
#include <roapi.h>
#include <winstring.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Devices.Midi2.h>
#include <winrt/Windows.Devices.Midi2.Enumeration.h>
#include <winrt/Windows.Devices.Midi2.Diagnostics.h>
#include <WindowsMidiServicesAppSdkComExtensions.h>
#include <string>
#include <map>
#include <atomic>
Include dependency graph for dx_midi_services.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  dx::midi::services::target
 a stream of an endpoint: the direction, the index in the device More...

Namespaces

namespace  dx
 the interface headers shared with user mode spell the status as dx:: does
namespace  dx::midi
namespace  dx::midi::services
 Windows MIDI Services: the MIDI service of Windows 11 (midisrv), its endpoints spoken to in Universal MIDI Packets through the App SDK (Windows.Devices.Midi2).

Macros

#define dx_catch_winrt
 the catch clause behind a WinRT call: what it throws becomes a dx::exception carrying the HRESULT
#define DX_MEMBERS_MIDI_SERVICES_TARGET(X)
#define interface   __STRUCT__

Typedefs

typedef dx::stream::desc< target, 2, 1 > dx::midi::services::desc
typedef std::map< std::string, std::string > dx::midi::services::dictionary
 matching dictionary: verb -> case-insensitive substring; id -> the endpoint device id, name -> the endpoint's name, vendor -> the manufacturer, transport -> the transport code (KS, KSA, LOOP, VIRT, NET, BLE, DIAG), vid/pid -> the USB ids in hex. A driver's match is a vector of them: any dictionary whose entries all match takes the endpoint, an empty vector takes every endpoint

Functions

int32_t __stdcall dx::midi::services::activation (void *id, const ::winrt::guid &iid, void **factory) noexcept
 the registration free activation: what Windows registers is taken from it, the SDK's own classes from its DLL beside the binary or in System32
bool dx::midi::services::available () noexcept try
 whether the SDK stands on this machine: its MidiApi resolves
dx::stream::bus::bus dx::midi::services::bus (const std::string &transport) noexcept
 the dx::stream::bus an endpoint's transport stands for
 dx::midi::services::catch (...)
void dx::midi::services::install () noexcept
 installs the activation once, ahead of the first WinRT call
std::ostream & operator<< (std::ostream &os, const dx::midi::services::target &target)

Macro Definition Documentation

◆ dx_catch_winrt

#define dx_catch_winrt
Value:
catch(const ::winrt::hresult_error& __dx_error){\
dx::halt();\
throw dx::exception{\
"WinRT",\
static_cast<dx::os_result>(__dx_error.code().value),\
::winrt::to_string(__dx_error.message()),\
__FILE__, static_cast<unsigned int>(__LINE__)};}
Definition dx_exception.h:181
#define __PRETTY_FUNCTION__
mock compiler idiosyncrasies
Definition windows/dx_platform.h:50

the catch clause behind a WinRT call: what it throws becomes a dx::exception carrying the HRESULT

◆ DX_MEMBERS_MIDI_SERVICES_TARGET

#define DX_MEMBERS_MIDI_SERVICES_TARGET ( X)
Value:
X##_direction(direction) X##_value(index)

◆ interface

#define interface   __STRUCT__

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const dx::midi::services::target & target )
inline
Here is the call graph for this function:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.