Skip to content

Commit

Permalink
Merge pull request #411 from microsoft/pete-dev
Browse files Browse the repository at this point in the history
Pete dev
  • Loading branch information
Psychlist1972 authored Oct 11, 2024
2 parents 4845c02 + 67a27b4 commit f49ebdf
Show file tree
Hide file tree
Showing 36 changed files with 606 additions and 263 deletions.
326 changes: 166 additions & 160 deletions build/nuke_build/Build.cs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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="Developer Preview 7 Arm64" ?>
<?define SetupVersionNumber="1.0.24281.1756" ?>
<?define SetupVersionNumber="1.0.24284.1747" ?>
</Include>
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<LibraryPath>$(VC_LibraryPath_ARM64);$(WindowsSDK_LibraryPath_ARM64);$(WindowsSdkDir)\Testing\Development\lib\$(Platform);$(SolutionDir)\VSFiles\intermediate\midikscommon\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midiksenum\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midiks\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midixproc\$(Platform)\$(Configuration)</LibraryPath>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<BuildAsX>true</BuildAsX>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
Expand All @@ -122,6 +123,7 @@
<LibraryPath>$(VC_LibraryPath_ARM64);$(WindowsSDK_LibraryPath_ARM64);$(WindowsSdkDir)\Testing\Development\lib\$(Platform);$(SolutionDir)\VSFiles\intermediate\midikscommon\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midiksenum\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midiks\$(Platform)\$(Configuration);$(SolutionDir)\VSFiles\intermediate\midixproc\$(Platform)\$(Configuration)</LibraryPath>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<BuildAsX>true</BuildAsX>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand All @@ -148,7 +150,7 @@
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand All @@ -167,7 +169,7 @@
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\ARM64EC\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand All @@ -179,14 +181,14 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration);$(IntDir);$(SolutionDir)VSFiles\intermediate\midisrv\$(Platform)\$(Configuration)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration);$(IntDir);$(SolutionDir)VSFiles\intermediate\midisrv\x64\$(Configuration)</AdditionalIncludeDirectories>
<PrecompiledHeader>Create</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\ARM64EC\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand Down Expand Up @@ -220,7 +222,7 @@
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand All @@ -239,7 +241,7 @@
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\ARM64EC\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand All @@ -251,14 +253,14 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration);$(IntDir);$(SolutionDir)VSFiles\intermediate\midisrv\$(Platform)\$(Configuration)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration);$(IntDir);$(SolutionDir)VSFiles\intermediate\midisrv\x64\$(Configuration)</AdditionalIncludeDirectories>
<PrecompiledHeader>Create</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<DisableSpecificWarnings>4324</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;ksuser.lib;avrt.lib;midiks.lib;midixproc.lib;midikscommon.lib;midiksenum.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);onecoreuap.lib;avrt.lib;$(SolutionDir)VSFiles\ARM64EC\$(Configuration)\midixproc.lib;$(CoreLibraryDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Midi2.MidiSrvAbstraction.def</ModuleDefinitionFile>
</Link>
<Midl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ CMidi2NetworkMidiConfigurationManager::ValidateHostDefinition(
MidiNetworkUdpHostDefinition& definition,
winrt::hstring& errorMessage)
{
errorMessage = L"";

// is there a unique identifier?

if (definition.EntryIdentifier.empty())
Expand Down Expand Up @@ -295,7 +297,7 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(
definition.EntryIdentifier = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_ENTRY_IDENTIFIER_KEY, L""));

definition.UmpEndpointName = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_COMMON_NAME_PROPERTY, L""));
definition.ProductInstanceId = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_COMMON_PRODUCT_INSTANCE_ID_PROPERTY, L""));
definition.ProductInstanceId = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_PRODUCT_INSTANCE_ID_PROPERTY, L""));

definition.Authentication = MidiNetworkUdpHostAuthenticationFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_AUTHENTICATION_KEY, L""));
definition.ConnectionPolicy = MidiNetworkUdpHostConnectionPolicyFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CONNECTION_POLICY_KEY, L""));
Expand Down Expand Up @@ -340,7 +342,7 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(

// if the provided service instance name is empty, default to
// machine name. If that name is already in use, add an additional
// disambiguator
// disambiguation value
if (serviceInstanceNamePrefix.empty())
{
std::wstring buffer{};
Expand All @@ -356,7 +358,7 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(

definition.ServiceInstanceName = serviceInstanceNamePrefix;

// TODO: See if the serviceInstanceName is already in use. If so, add a disambiguator number
// TODO: See if the serviceInstanceName is already in use. If so, add a disambiguation number



Expand All @@ -365,12 +367,14 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(

if (SUCCEEDED(ValidateHostDefinition(definition, validationErrorMessage)))
{

// create the host

auto host = std::make_shared<MidiNetworkHost>();

RETURN_HR_IF_NULL(E_POINTER, host);
RETURN_IF_FAILED(host->Initialize(definition));


host->Start();
}
else
{
Expand Down
9 changes: 7 additions & 2 deletions src/api/Abstraction/UdpNetworkMidi2/MidiNetworkHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ MidiNetworkHost::Start()
));


// start listening on a new thread.

// TODO: start listening on a new thread.
//ProcessIncomingPackets();







return S_OK;
}

Expand Down
12 changes: 12 additions & 0 deletions src/api/Abstraction/UdpNetworkMidi2/TransportState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@ TransportState::ConstructConfigurationManager()
{
RETURN_IF_FAILED(Microsoft::WRL::MakeAndInitialize<CMidi2NetworkMidiConfigurationManager>(&m_configurationManager));

return S_OK;
}


_Use_decl_annotations_
HRESULT
TransportState::AddHost(MidiNetworkHost* host)
{
RETURN_HR_IF_NULL(E_INVALIDARG, host);



return S_OK;
}
8 changes: 7 additions & 1 deletion src/api/Abstraction/UdpNetworkMidi2/TransportState.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,17 @@ class TransportState
m_endpointManager.reset();
m_configurationManager.reset();

// TODO: Iterate through hosts and clients and call Cleanup()

return S_OK;
}


HRESULT ConstructEndpointManager();
HRESULT ConstructConfigurationManager();

HRESULT AddHost(_In_ MidiNetworkHost* host);


private:
TransportState();
Expand All @@ -58,5 +62,7 @@ class TransportState
wil::com_ptr<CMidi2NetworkMidiEndpointManager> m_endpointManager;
wil::com_ptr<CMidi2NetworkMidiConfigurationManager> m_configurationManager;

// std::shared_ptr<MidiNetworkDeviceTable> m_endpointTable = std::make_shared<MidiNetworkDeviceTable>();
// key is the host identifier
std::map<winrt::hstring, std::shared_ptr<MidiNetworkHost>> m_hosts;

};
2 changes: 2 additions & 0 deletions src/api/Abstraction/UdpNetworkMidi2/transport_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@
#define MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_AUTHENTICATION_USER_AUTH_KEY L"userAuth" // credential key to user/password entry in vault


#define MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_PRODUCT_INSTANCE_ID_PROPERTY L"productInstanceId"

#define MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CLIENT_KEY L"client"
6 changes: 6 additions & 0 deletions src/api/Inc/MidiDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
// per message
#define MAXIMUM_LIBMIDI2_BYTESTREAM_DATASIZE 20

// speed of a standard MIDI 1.0 connection. Used in the SDK, and will be used in
// transforms or service in the future when we introduce optional throttling
#define MIDI_1_STANDARD_BITS_PER_SECOND 31250
// this is /10 and not /8 because MIDI 1 standard was 8-n-1, or 10 bits per byte
#define MIDI_1_STANDARD_BYTES_PER_SECOND (MIDI_1_STANDARD_BITS_PER_SECOND / 10)

// largest supported bytestream is 2048
// TODO: revisit this, possibly have wdmaud2 chunk down large sysex messages to
// something more manageable
Expand Down
18 changes: 10 additions & 8 deletions src/api/Libs/MidiXProc/MidiXProc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,32 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<BuildAsX>true</BuildAsX>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<BuildAsX>true</BuildAsX>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)VSFiles\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)VSFiles\intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
Expand All @@ -148,7 +150,7 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
Expand Down Expand Up @@ -180,7 +182,7 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
Expand Down
Loading

0 comments on commit f49ebdf

Please sign in to comment.