Skip to content

Commit

Permalink
Merge pull request #543 from microsoft/pete-dev
Browse files Browse the repository at this point in the history
First run experience updates, new SWD properties, more
  • Loading branch information
Psychlist1972 authored Feb 16, 2025
2 parents 3c84fc2 + 095bd69 commit e2a1306
Show file tree
Hide file tree
Showing 76 changed files with 2,034 additions and 453 deletions.
1 change: 1 addition & 0 deletions build/nuke_build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ void UpdateSetupBundleInfoIncludeFile(string platform)

paths.Add(settingsOutputFolder / "Assets" / "AppIcon.ico");
paths.Add(settingsOutputFolder / "Assets" / "AppIcon.png");
paths.Add(settingsOutputFolder / "Assets" / "LoopbackDiagram.svg");


// TODO: This doesn't deal with any localization content
Expand Down
2 changes: 1 addition & 1 deletion build/staging/version/BundleInfo.wxi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Include>
<?define SetupVersionName="Customer Preview 2 Arm64" ?>
<?define SetupVersionNumber="1.0.3-preview-11.250213-52" ?>
<?define SetupVersionNumber="1.0.3-preview-11.250215-2126" ?>
</Include>
6 changes: 3 additions & 3 deletions build/staging/version/WindowsMidiServicesVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ public static class MidiBuildInformation
{
public const string Source = "GitHub Preview";
public const string Name = "Customer Preview 2";
public const string BuildFullVersion = "1.0.3-preview-11.250213-52";
public const string BuildFullVersion = "1.0.3-preview-11.250215-2126";
public const string VersionMajor = "1";
public const string VersionMinor = "0";
public const string VersionRevision = "3";
public const string VersionDateNumber = "250213";
public const string VersionTimeNumber = "52";
public const string VersionDateNumber = "250215";
public const string VersionTimeNumber = "2126";
}
}

6 changes: 3 additions & 3 deletions build/staging/version/WindowsMidiServicesVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

#define WINDOWS_MIDI_SERVICES_BUILD_SOURCE L"GitHub Preview"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Customer Preview 2"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.3-preview-11.250213-52"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.3-preview-11.250215-2126"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MAJOR L"1"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MINOR L"0"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"3"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250213"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"52"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250215"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"2126"

#endif

2 changes: 1 addition & 1 deletion samples/cpp-winrt/basics/client-basics-cpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>false</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/basics/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/loopback-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
2 changes: 1 addition & 1 deletion samples/cpp-winrt/send-speed/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
2 changes: 1 addition & 1 deletion samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/simple-app-to-app-midi/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/static-enum-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
2 changes: 1 addition & 1 deletion samples/cpp-winrt/watch-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250213-52" targetFramework="native" />
<package id="Microsoft.Windows.Devices.Midi2" version="1.0.3-preview-11.250215-2126" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250213-52</WindowsMidiServicesSdkPackage>
<WindowsMidiServicesSdkPackage>Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250215-2126</WindowsMidiServicesSdkPackage>
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
Expand Down
5 changes: 4 additions & 1 deletion src/api/Inc/MidiDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,11 @@ DEFINE_MIDIDEVPROPKEY(PKEY_MIDI_VirtualMidiEndpointAssociator, 900); // DEVP
#define STRING_PKEY_MIDI_UseOldMidi1PortNamingScheme MIDI_STRING_PKEY_GUID MIDI_STRING_PKEY_PID_SEPARATOR L"1000"
DEFINE_MIDIDEVPROPKEY(PKEY_MIDI_UseOldMidi1PortNamingScheme, 1000); // DEVPROP_TYPE_BOOL

#define STRING_PKEY_MIDI_UseGroupTerminalBlocksForExactMidi1PortNames MIDI_STRING_PKEY_GUID MIDI_STRING_PKEY_PID_SEPARATOR L"1010"
DEFINE_MIDIDEVPROPKEY(PKEY_MIDI_UseGroupTerminalBlocksForExactMidi1PortNames, 1010); // DEVPROP_TYPE_BOOLEAN


#define STRING_PKEY_MIDI_CreateMidi1PortsForEndpoint MIDI_STRING_PKEY_GUID MIDI_STRING_PKEY_PID_SEPARATOR L"1020"
DEFINE_MIDIDEVPROPKEY(PKEY_MIDI_CreateMidi1PortsForEndpoint, 1020); // DEVPROP_TYPE_BOOLEAN


// Structures for properties =================================================================
Expand Down
3 changes: 2 additions & 1 deletion src/api/Inc/midi_naming.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ namespace WindowsMidiServicesInternal::Midi1PortNaming
// for whole word. We do other removal in the next step
if (pinName == L"MIDI" ||
pinName == L"Out" || pinName == L"OUT" || pinName == L"out" ||
pinName == L"In" || pinName == L"IN" || pinName == L"in"
pinName == L"In" || pinName == L"IN" || pinName == L"in" ||
pinName == L"IO"
)
{
cleanedPinName = L"";
Expand Down
29 changes: 24 additions & 5 deletions src/api/Service/Exe/MidiDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "ks.h"
#include "Midi2KSAggregateTransport.h"
#include "Midi2KSTransport.h"
#include "Midi2LoopbackMidiTransport.h"

using namespace winrt::Windows::Devices::Enumeration;

Expand Down Expand Up @@ -2329,6 +2330,8 @@ CMidiDeviceManager::SyncMidi1Ports(
additionalProperties.Append(STRING_PKEY_MIDI_GroupTerminalBlocks);
additionalProperties.Append(STRING_PKEY_MIDI_EndpointDiscoveryProcessComplete);
additionalProperties.Append(STRING_PKEY_MIDI_CustomPortAssignments);
additionalProperties.Append(STRING_PKEY_MIDI_UseGroupTerminalBlocksForExactMidi1PortNames);
additionalProperties.Append(STRING_PKEY_MIDI_CreateMidi1PortsForEndpoint);

// We have function blocks to retrieve
// build up the property keys to query for the function blocks
Expand All @@ -2344,6 +2347,21 @@ CMidiDeviceManager::SyncMidi1Ports(

auto deviceInfo = DeviceInformation::CreateFromIdAsync(umpMidiPort->DeviceInterfaceId.get(), additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind::DeviceInterface).get();

// First, let's check to see if we should be creating MIDI 1 ports for this endpoint
// default action, if unspecified, is to create the ports
auto createMidi1PortsProp = deviceInfo.Properties().Lookup(STRING_PKEY_MIDI_CreateMidi1PortsForEndpoint);
if (createMidi1PortsProp)
{
auto createPorts = winrt::unbox_value<bool>(createMidi1PortsProp);

if (!createPorts)
{
// it's not an error condition to skip creating MIDI 1 ports for an endpoint
return S_OK;
}
}


// get the current function block information from the UMP SWD, if present, else fall back to
// GTB if that is present. If neither, then there's nothing more to do.
hrTemp = GetFunctionBlockPortInfo(umpMidiPort->DeviceInterfaceId.get(), deviceInfo, portInfo);
Expand Down Expand Up @@ -2475,12 +2493,13 @@ CMidiDeviceManager::SyncMidi1Ports(
DEVPROP_TYPE_BYTE, (ULONG)(sizeof(BYTE)), (PVOID)(&(nativeDataFormat)) });
}

// KSA uses port names for the GTB names. But the new MIDI 2.0 UMP driver
// does the same for MIDI 1.0 devices. So we check both KSA and KS here.
if (transportId == winrt::guid(__uuidof(Midi2KSAggregateTransport)) ||
(transportId == winrt::guid(__uuidof(Midi2KSTransport)) && WI_IsFlagSet(nativeDataFormat, MidiDataFormats::MidiDataFormats_ByteStream)))
//if (transportId == winrt::guid(__uuidof(Midi2KSAggregateTransport)) ||
// transportId == winrt::guid(__uuidof(Midi2LoopbackMidiTransport)) ||
// (transportId == winrt::guid(__uuidof(Midi2KSTransport)) && WI_IsFlagSet(nativeDataFormat, MidiDataFormats::MidiDataFormats_ByteStream)))
prop = deviceInfo.Properties().Lookup(STRING_PKEY_MIDI_UseGroupTerminalBlocksForExactMidi1PortNames);
if (prop)
{
usePortInfoName = true;
usePortInfoName = winrt::unbox_value<bool>(prop);
}

prop = deviceInfo.Properties().Lookup(STRING_PKEY_MIDI_CustomEndpointName);
Expand Down
Loading

0 comments on commit e2a1306

Please sign in to comment.