Skip to content

Commit ae2f887

Browse files
committed
Merged PR 62453: Release 0.17
Release 0.17
1 parent 850eaaf commit ae2f887

File tree

409 files changed

+15690
-5080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+15690
-5080
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ bld/
3030
# Uncomment if you have tasks that create the project's static files in wwwroot
3131
#wwwroot/
3232

33+
# Visual Studio 2017 auto generated files
34+
Generated\ Files/
35+
3336
# MSTest test Results
3437
[Tt]est[Rr]esult*/
3538
[Bb]uild[Ll]og.*

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Company>Microsoft Corporation</Company>
77
<Owners>microsoft,psi</Owners>
88
<Authors>Microsoft</Authors>
9-
<AssemblyVersion>0.16.92.1</AssemblyVersion>
9+
<AssemblyVersion>0.17.52.1</AssemblyVersion>
1010
<FileVersion>$(AssemblyVersion)</FileVersion>
1111
<Version>$(AssemblyVersion)-beta</Version>
1212
<SignAssembly>false</SignAssembly>

Psi.sln

+45-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28917.182
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.2.32210.308
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{A0856299-D28A-4513-B964-3FA5290FF160}"
77
EndProject
@@ -214,6 +214,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Psi.MixedReality.
214214
EndProject
215215
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.MixedReality.Visualization.Windows", "Sources\MixedReality\Microsoft.Psi.MixedReality.Visualization.Windows\Microsoft.Psi.MixedReality.Visualization.Windows.csproj", "{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}"
216216
EndProject
217+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Psi.Onnx.Visualization.Windows", "Sources\Integrations\Onnx\Microsoft.Psi.Onnx.Visualization.Windows\Microsoft.Psi.Onnx.Visualization.Windows.csproj", "{74504D41-B716-4B0B-B265-ED2A91A2A5C2}"
218+
EndProject
219+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HoloLensCapture", "HoloLensCapture", "{49072585-8CC1-43A5-BE0D-ABCE888BC5D1}"
220+
ProjectSection(SolutionItems) = preProject
221+
Sources\MixedReality\HoloLensCapture\Readme.md = Sources\MixedReality\HoloLensCapture\Readme.md
222+
EndProjectSection
223+
EndProject
224+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoloLensCaptureApp", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureApp\HoloLensCaptureApp.csproj", "{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}"
225+
EndProject
226+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureServer", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureServer\HoloLensCaptureServer.csproj", "{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}"
227+
EndProject
228+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureExporter", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureExporter\HoloLensCaptureExporter.csproj", "{1C844B9E-A51C-483C-A045-7AB8F2012581}"
229+
EndProject
230+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureInterop", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureInterop\HoloLensCaptureInterop.csproj", "{76E38559-0AF2-4AE3-BCE8-8653277A5B07}"
231+
EndProject
217232
Global
218233
GlobalSection(SolutionConfigurationPlatforms) = preSolution
219234
Debug|Any CPU = Debug|Any CPU
@@ -476,6 +491,28 @@ Global
476491
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Debug|Any CPU.Build.0 = Debug|Any CPU
477492
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Release|Any CPU.ActiveCfg = Release|Any CPU
478493
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Release|Any CPU.Build.0 = Release|Any CPU
494+
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
495+
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
496+
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
497+
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Release|Any CPU.Build.0 = Release|Any CPU
498+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.ActiveCfg = Debug|ARM
499+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.Build.0 = Debug|ARM
500+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.Deploy.0 = Debug|ARM
501+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.ActiveCfg = Release|ARM
502+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.Build.0 = Release|ARM
503+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.Deploy.0 = Release|ARM
504+
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
505+
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
506+
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
507+
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Release|Any CPU.Build.0 = Release|Any CPU
508+
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
509+
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Debug|Any CPU.Build.0 = Debug|Any CPU
510+
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Release|Any CPU.ActiveCfg = Release|Any CPU
511+
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Release|Any CPU.Build.0 = Release|Any CPU
512+
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
513+
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Debug|Any CPU.Build.0 = Debug|Any CPU
514+
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Release|Any CPU.ActiveCfg = Release|Any CPU
515+
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Release|Any CPU.Build.0 = Release|Any CPU
479516
EndGlobalSection
480517
GlobalSection(SolutionProperties) = preSolution
481518
HideSolutionNode = FALSE
@@ -570,6 +607,12 @@ Global
570607
{3434D5B2-B06F-4356-9E9B-90171CEF482B} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
571608
{ECD9E150-8104-4DA3-B807-A6A4392A67C6} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
572609
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
610+
{74504D41-B716-4B0B-B265-ED2A91A2A5C2} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
611+
{49072585-8CC1-43A5-BE0D-ABCE888BC5D1} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
612+
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
613+
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
614+
{1C844B9E-A51C-483C-A045-7AB8F2012581} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
615+
{76E38559-0AF2-4AE3-BCE8-8653277A5B07} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
573616
EndGlobalSection
574617
GlobalSection(ExtensibilityGlobals) = postSolution
575618
SolutionGuid = {EAF15EE9-DCC5-411B-A9E5-7C2F3D132331}

Sources/Audio/Microsoft.Psi.Audio.Linux/AudioCapture.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace Microsoft.Psi.Audio
2020
public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDisposable
2121
{
2222
private readonly Pipeline pipeline;
23+
private readonly string name;
2324

2425
/// <summary>
2526
/// The configuration for this component.
@@ -41,11 +42,6 @@ public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDi
4142
/// </summary>
4243
private AudioBuffer buffer;
4344

44-
/// <summary>
45-
/// Keep track of the timestamp of the last audio buffer (computed from the value reported to us by the capture driver).
46-
/// </summary>
47-
private DateTime lastPostedAudioTime = DateTime.MinValue;
48-
4945
private Thread background;
5046
private volatile bool isStopping;
5147

@@ -54,9 +50,11 @@ public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDi
5450
/// </summary>
5551
/// <param name="pipeline">The pipeline to add the component to.</param>
5652
/// <param name="configuration">The component configuration.</param>
57-
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
53+
/// <param name="name">An optional name for this component.</param>
54+
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration, string name = nameof(AudioCapture))
5855
{
5956
this.pipeline = pipeline;
57+
this.name = name;
6058
this.configuration = configuration;
6159
this.audioBuffers = pipeline.CreateEmitter<AudioBuffer>(this, "AudioBuffers");
6260
}
@@ -176,6 +174,9 @@ public void Stop(DateTime finalOriginatingTime, Action notifyCompleted)
176174
notifyCompleted();
177175
}
178176

177+
/// <inheritdoc/>
178+
public override string ToString() => this.name;
179+
179180
private void Stop()
180181
{
181182
// stop any running background thread and wait for it to terminate

Sources/Audio/Microsoft.Psi.Audio.Linux/AudioPlayer.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ public sealed class AudioPlayer : SimpleConsumer<AudioBuffer>, IDisposable
4040
/// </summary>
4141
/// <param name="pipeline">The pipeline to add the component to.</param>
4242
/// <param name="configuration">The component configuration.</param>
43-
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
44-
: base(pipeline)
43+
/// <param name="name">An optional name for this component.</param>
44+
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration, string name = nameof(AudioPlayer))
45+
: base(pipeline, name)
4546
{
4647
pipeline.PipelineRun += (s, e) => this.OnPipelineRun();
4748
this.In.Unsubscribed += _ => this.OnUnsubscribed();

Sources/Audio/Microsoft.Psi.Audio.Windows/AudioCapture.cs

+14-5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace Microsoft.Psi.Audio
2323
public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDisposable
2424
{
2525
private readonly Pipeline pipeline;
26+
private readonly string name;
2627

2728
/// <summary>
2829
/// The configuration for this component.
@@ -59,9 +60,11 @@ public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDi
5960
/// </summary>
6061
/// <param name="pipeline">The pipeline to add the component to.</param>
6162
/// <param name="configuration">The component configuration.</param>
62-
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
63+
/// <param name="name">An optional name for the component.</param>
64+
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration, string name = nameof(AudioCapture))
6365
{
6466
this.pipeline = pipeline;
67+
this.name = name;
6568
this.configuration = configuration;
6669
this.audioBuffers = pipeline.CreateEmitter<AudioBuffer>(this, "AudioBuffers");
6770
this.AudioLevelInput = pipeline.CreateReceiver<double>(this, this.SetAudioLevel, nameof(this.AudioLevelInput), true);
@@ -81,10 +84,12 @@ public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
8184
/// </summary>
8285
/// <param name="pipeline">The pipeline to add the component to.</param>
8386
/// <param name="configurationFilename">The component configuration file.</param>
84-
public AudioCapture(Pipeline pipeline, string configurationFilename = null)
87+
/// <param name="name">An optional name for the component.</param>
88+
public AudioCapture(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioCapture))
8589
: this(
8690
pipeline,
87-
(configurationFilename == null) ? new AudioCaptureConfiguration() : new ConfigurationHelper<AudioCaptureConfiguration>(configurationFilename).Configuration)
91+
(configurationFilename == null) ? new AudioCaptureConfiguration() : new ConfigurationHelper<AudioCaptureConfiguration>(configurationFilename).Configuration,
92+
name)
8893
{
8994
}
9095

@@ -94,8 +99,9 @@ public AudioCapture(Pipeline pipeline, string configurationFilename = null)
9499
/// <param name="pipeline">The pipeline to add the component to.</param>
95100
/// <param name="outputFormat">The output format to use.</param>
96101
/// <param name="deviceName">The name of the audio device.</param>
97-
public AudioCapture(Pipeline pipeline, WaveFormat outputFormat, string deviceName = null)
98-
: this(pipeline, new AudioCaptureConfiguration() { Format = outputFormat, DeviceName = deviceName })
102+
/// <param name="name">An optional name for the component.</param>
103+
public AudioCapture(Pipeline pipeline, WaveFormat outputFormat, string deviceName = null, string name = nameof(AudioCapture))
104+
: this(pipeline, new AudioCaptureConfiguration() { Format = outputFormat, DeviceName = deviceName }, name)
99105
{
100106
}
101107

@@ -198,6 +204,9 @@ public void Stop(DateTime finalOriginatingTime, Action notifyCompleted)
198204
this.sourceFormat = null;
199205
}
200206

207+
/// <inheritdoc/>
208+
public override string ToString() => this.name;
209+
201210
/// <summary>
202211
/// The event handler that processes new audio data packets.
203212
/// </summary>

Sources/Audio/Microsoft.Psi.Audio.Windows/AudioPlayer.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public sealed class AudioPlayer : SimpleConsumer<AudioBuffer>, ISourceComponent,
3535
/// </summary>
3636
/// <param name="pipeline">The pipeline to add the component to.</param>
3737
/// <param name="configuration">The component configuration.</param>
38-
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
39-
: base(pipeline)
38+
/// <param name="name">An optional name for the component.</param>
39+
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration, string name = nameof(AudioPlayer))
40+
: base(pipeline, name)
4041
{
4142
this.pipeline = pipeline;
4243
this.configuration = configuration;
@@ -58,10 +59,12 @@ public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
5859
/// </summary>
5960
/// <param name="pipeline">The pipeline to add the component to.</param>
6061
/// <param name="configurationFilename">The component configuration file.</param>
61-
public AudioPlayer(Pipeline pipeline, string configurationFilename = null)
62+
/// <param name="name">An optional name for the component.</param>
63+
public AudioPlayer(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioPlayer))
6264
: this(
6365
pipeline,
64-
(configurationFilename == null) ? new AudioPlayerConfiguration() : new ConfigurationHelper<AudioPlayerConfiguration>(configurationFilename).Configuration)
66+
(configurationFilename == null) ? new AudioPlayerConfiguration() : new ConfigurationHelper<AudioPlayerConfiguration>(configurationFilename).Configuration,
67+
name)
6568
{
6669
}
6770

Sources/Audio/Microsoft.Psi.Audio.Windows/AudioResampler.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public sealed class AudioResampler : ConsumerProducer<AudioBuffer, AudioBuffer>,
5151
/// </summary>
5252
/// <param name="pipeline">The pipeline to add the component to.</param>
5353
/// <param name="configuration">The component configuration.</param>
54-
public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configuration)
55-
: base(pipeline)
54+
/// <param name="name">An optional name for the component.</param>
55+
public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configuration, string name = nameof(AudioResampler))
56+
: base(pipeline, name)
5657
{
5758
this.configuration = configuration;
5859
this.currentInputFormat = configuration.InputFormat;
@@ -73,10 +74,12 @@ public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configurati
7374
/// </summary>
7475
/// <param name="pipeline">The pipeline to add the component to.</param>
7576
/// <param name="configurationFilename">The component configuration file.</param>
76-
public AudioResampler(Pipeline pipeline, string configurationFilename = null)
77+
/// <param name="name">An optional name for the component.</param>
78+
public AudioResampler(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioResampler))
7779
: this(
7880
pipeline,
79-
(configurationFilename == null) ? new AudioResamplerConfiguration() : new ConfigurationHelper<AudioResamplerConfiguration>(configurationFilename).Configuration)
81+
(configurationFilename == null) ? new AudioResamplerConfiguration() : new ConfigurationHelper<AudioResamplerConfiguration>(configurationFilename).Configuration,
82+
name)
8083
{
8184
}
8285

Sources/Audio/Microsoft.Psi.Audio.Windows/Operators.cs

+14-8
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,28 @@ public static class Operators
1717
/// <param name="source">A stream of audio to be resampled.</param>
1818
/// <param name="configuration">The resampler configuration.</param>
1919
/// <param name="deliveryPolicy">An optional delivery policy.</param>
20+
/// <param name="name">An optional name for the stream operator.</param>
2021
/// <returns>A stream of resampled audio.</returns>
21-
public static IProducer<AudioBuffer> Resample(this IProducer<AudioBuffer> source, AudioResamplerConfiguration configuration, DeliveryPolicy<AudioBuffer> deliveryPolicy = null)
22-
{
23-
return source.PipeTo(new AudioResampler(source.Out.Pipeline, configuration), deliveryPolicy);
24-
}
22+
public static IProducer<AudioBuffer> Resample(
23+
this IProducer<AudioBuffer> source,
24+
AudioResamplerConfiguration configuration,
25+
DeliveryPolicy<AudioBuffer> deliveryPolicy = null,
26+
string name = nameof(Resample))
27+
=> source.PipeTo(new AudioResampler(source.Out.Pipeline, configuration, name), deliveryPolicy);
2528

2629
/// <summary>
2730
/// Resamples an audio stream.
2831
/// </summary>
2932
/// <param name="source">A stream audio to be resampled.</param>
3033
/// <param name="outputFormat">The desired audio output format for the resampled stream.</param>
3134
/// <param name="deliveryPolicy">An optional delivery policy.</param>
35+
/// <param name="name">An optional name for the stream operator.</param>
3236
/// <returns>A stream of resampled audio.</returns>
33-
public static IProducer<AudioBuffer> Resample(this IProducer<AudioBuffer> source, WaveFormat outputFormat, DeliveryPolicy<AudioBuffer> deliveryPolicy = null)
34-
{
35-
return Resample(source, new AudioResamplerConfiguration() { OutputFormat = outputFormat }, deliveryPolicy);
36-
}
37+
public static IProducer<AudioBuffer> Resample(
38+
this IProducer<AudioBuffer> source,
39+
WaveFormat outputFormat,
40+
DeliveryPolicy<AudioBuffer> deliveryPolicy = null,
41+
string name = nameof(Resample))
42+
=> Resample(source, new AudioResamplerConfiguration() { OutputFormat = outputFormat }, deliveryPolicy, name);
3743
}
3844
}

0 commit comments

Comments
 (0)