working on win32 uwp! and libremidi update

This commit is contained in:
Sebastian @ HfG
2024-10-28 19:24:18 +01:00
parent 06cb6d8319
commit 1e3755148c
106 changed files with 8474 additions and 2198 deletions
+5 -12
View File
@@ -1,15 +1,8 @@
#pragma once
#define NOMINMAX 1
#define WIN32_LEAN_AND_MEAN 1
#include <libremidi/backends/winmm/error_domain.hpp>
#include <libremidi/detail/midi_api.hpp>
#include <algorithm>
// clang-format off
#include <windows.h>
#include <mmsystem.h>
// clang-format on
namespace libremidi
{
@@ -44,10 +37,10 @@ inline std::string ConvertToUTF8(const TCHAR* str)
// Next functions add the portNumber to the name so that
// the device's names are sure to be listed with individual names
// even when they have the same brand name
inline void MakeUniqueInPortName(std::string& deviceName, unsigned int portNumber)
inline void MakeUniqueInPortName(std::string& deviceName, std::size_t portNumber)
{
int x = 1;
for (unsigned int i = 0; i < portNumber; i++)
for (std::size_t i = 0; i < portNumber; i++)
{
MIDIINCAPS deviceCaps;
midiInGetDevCaps(i, &deviceCaps, sizeof(MIDIINCAPS));
@@ -61,10 +54,10 @@ inline void MakeUniqueInPortName(std::string& deviceName, unsigned int portNumbe
deviceName += std::to_string(x);
}
inline void MakeUniqueOutPortName(std::string& deviceName, unsigned int portNumber)
inline void MakeUniqueOutPortName(std::string& deviceName, std::size_t portNumber)
{
int x = 1;
for (unsigned int i = 0; i < portNumber; i++)
for (std::size_t i = 0; i < portNumber; i++)
{
MIDIOUTCAPS deviceCaps;
midiOutGetDevCaps(i, &deviceCaps, sizeof(MIDIOUTCAPS));