Skip to content

Commit

Permalink
Merged PR 62453: Release 0.17
Browse files Browse the repository at this point in the history
Release 0.17
  • Loading branch information
danbohus committed Apr 20, 2022
1 parent 850eaaf commit ae2f887
Show file tree
Hide file tree
Showing 409 changed files with 15,690 additions and 5,080 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -30,6 +30,9 @@ bld/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Expand Up @@ -6,7 +6,7 @@
<Company>Microsoft Corporation</Company>
<Owners>microsoft,psi</Owners>
<Authors>Microsoft</Authors>
<AssemblyVersion>0.16.92.1</AssemblyVersion>
<AssemblyVersion>0.17.52.1</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)-beta</Version>
<SignAssembly>false</SignAssembly>
Expand Down
47 changes: 45 additions & 2 deletions Psi.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28917.182
# Visual Studio Version 17
VisualStudioVersion = 17.2.32210.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{A0856299-D28A-4513-B964-3FA5290FF160}"
EndProject
Expand Down Expand Up @@ -214,6 +214,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Psi.MixedReality.
EndProject
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}"
EndProject
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}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HoloLensCapture", "HoloLensCapture", "{49072585-8CC1-43A5-BE0D-ABCE888BC5D1}"
ProjectSection(SolutionItems) = preProject
Sources\MixedReality\HoloLensCapture\Readme.md = Sources\MixedReality\HoloLensCapture\Readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoloLensCaptureApp", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureApp\HoloLensCaptureApp.csproj", "{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureServer", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureServer\HoloLensCaptureServer.csproj", "{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureExporter", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureExporter\HoloLensCaptureExporter.csproj", "{1C844B9E-A51C-483C-A045-7AB8F2012581}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloLensCaptureInterop", "Sources\MixedReality\HoloLensCapture\HoloLensCaptureInterop\HoloLensCaptureInterop.csproj", "{76E38559-0AF2-4AE3-BCE8-8653277A5B07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -476,6 +491,28 @@ Global
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114}.Release|Any CPU.Build.0 = Release|Any CPU
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74504D41-B716-4B0B-B265-ED2A91A2A5C2}.Release|Any CPU.Build.0 = Release|Any CPU
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.ActiveCfg = Debug|ARM
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.Build.0 = Debug|ARM
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Debug|Any CPU.Deploy.0 = Debug|ARM
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.ActiveCfg = Release|ARM
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.Build.0 = Release|ARM
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D}.Release|Any CPU.Deploy.0 = Release|ARM
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37}.Release|Any CPU.Build.0 = Release|Any CPU
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C844B9E-A51C-483C-A045-7AB8F2012581}.Release|Any CPU.Build.0 = Release|Any CPU
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76E38559-0AF2-4AE3-BCE8-8653277A5B07}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -570,6 +607,12 @@ Global
{3434D5B2-B06F-4356-9E9B-90171CEF482B} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
{ECD9E150-8104-4DA3-B807-A6A4392A67C6} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
{BE95524A-F9C2-4D0D-8F7E-1C7019B5A114} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
{74504D41-B716-4B0B-B265-ED2A91A2A5C2} = {EE4035A8-CEFE-4E3A-9CD9-4AE7E88DA2C4}
{49072585-8CC1-43A5-BE0D-ABCE888BC5D1} = {32023088-0392-4B48-B2CF-3754B55C6DE9}
{D318834B-5A27-4EAC-B17D-A9BD7A2DCA0D} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
{272CEB19-2B5A-49BC-B8EA-CBC79AA87C37} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
{1C844B9E-A51C-483C-A045-7AB8F2012581} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
{76E38559-0AF2-4AE3-BCE8-8653277A5B07} = {49072585-8CC1-43A5-BE0D-ABCE888BC5D1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EAF15EE9-DCC5-411B-A9E5-7C2F3D132331}
Expand Down
13 changes: 7 additions & 6 deletions Sources/Audio/Microsoft.Psi.Audio.Linux/AudioCapture.cs
Expand Up @@ -20,6 +20,7 @@ namespace Microsoft.Psi.Audio
public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDisposable
{
private readonly Pipeline pipeline;
private readonly string name;

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

/// <summary>
/// Keep track of the timestamp of the last audio buffer (computed from the value reported to us by the capture driver).
/// </summary>
private DateTime lastPostedAudioTime = DateTime.MinValue;

private Thread background;
private volatile bool isStopping;

Expand All @@ -54,9 +50,11 @@ public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDi
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configuration">The component configuration.</param>
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
/// <param name="name">An optional name for this component.</param>
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration, string name = nameof(AudioCapture))
{
this.pipeline = pipeline;
this.name = name;
this.configuration = configuration;
this.audioBuffers = pipeline.CreateEmitter<AudioBuffer>(this, "AudioBuffers");
}
Expand Down Expand Up @@ -176,6 +174,9 @@ public void Stop(DateTime finalOriginatingTime, Action notifyCompleted)
notifyCompleted();
}

/// <inheritdoc/>
public override string ToString() => this.name;

private void Stop()
{
// stop any running background thread and wait for it to terminate
Expand Down
5 changes: 3 additions & 2 deletions Sources/Audio/Microsoft.Psi.Audio.Linux/AudioPlayer.cs
Expand Up @@ -40,8 +40,9 @@ public sealed class AudioPlayer : SimpleConsumer<AudioBuffer>, IDisposable
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configuration">The component configuration.</param>
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
: base(pipeline)
/// <param name="name">An optional name for this component.</param>
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration, string name = nameof(AudioPlayer))
: base(pipeline, name)
{
pipeline.PipelineRun += (s, e) => this.OnPipelineRun();
this.In.Unsubscribed += _ => this.OnUnsubscribed();
Expand Down
19 changes: 14 additions & 5 deletions Sources/Audio/Microsoft.Psi.Audio.Windows/AudioCapture.cs
Expand Up @@ -23,6 +23,7 @@ namespace Microsoft.Psi.Audio
public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDisposable
{
private readonly Pipeline pipeline;
private readonly string name;

/// <summary>
/// The configuration for this component.
Expand Down Expand Up @@ -59,9 +60,11 @@ public sealed class AudioCapture : IProducer<AudioBuffer>, ISourceComponent, IDi
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configuration">The component configuration.</param>
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
/// <param name="name">An optional name for the component.</param>
public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration, string name = nameof(AudioCapture))
{
this.pipeline = pipeline;
this.name = name;
this.configuration = configuration;
this.audioBuffers = pipeline.CreateEmitter<AudioBuffer>(this, "AudioBuffers");
this.AudioLevelInput = pipeline.CreateReceiver<double>(this, this.SetAudioLevel, nameof(this.AudioLevelInput), true);
Expand All @@ -81,10 +84,12 @@ public AudioCapture(Pipeline pipeline, AudioCaptureConfiguration configuration)
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configurationFilename">The component configuration file.</param>
public AudioCapture(Pipeline pipeline, string configurationFilename = null)
/// <param name="name">An optional name for the component.</param>
public AudioCapture(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioCapture))
: this(
pipeline,
(configurationFilename == null) ? new AudioCaptureConfiguration() : new ConfigurationHelper<AudioCaptureConfiguration>(configurationFilename).Configuration)
(configurationFilename == null) ? new AudioCaptureConfiguration() : new ConfigurationHelper<AudioCaptureConfiguration>(configurationFilename).Configuration,
name)
{
}

Expand All @@ -94,8 +99,9 @@ public AudioCapture(Pipeline pipeline, string configurationFilename = null)
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="outputFormat">The output format to use.</param>
/// <param name="deviceName">The name of the audio device.</param>
public AudioCapture(Pipeline pipeline, WaveFormat outputFormat, string deviceName = null)
: this(pipeline, new AudioCaptureConfiguration() { Format = outputFormat, DeviceName = deviceName })
/// <param name="name">An optional name for the component.</param>
public AudioCapture(Pipeline pipeline, WaveFormat outputFormat, string deviceName = null, string name = nameof(AudioCapture))
: this(pipeline, new AudioCaptureConfiguration() { Format = outputFormat, DeviceName = deviceName }, name)
{
}

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

/// <inheritdoc/>
public override string ToString() => this.name;

/// <summary>
/// The event handler that processes new audio data packets.
/// </summary>
Expand Down
11 changes: 7 additions & 4 deletions Sources/Audio/Microsoft.Psi.Audio.Windows/AudioPlayer.cs
Expand Up @@ -35,8 +35,9 @@ public sealed class AudioPlayer : SimpleConsumer<AudioBuffer>, ISourceComponent,
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configuration">The component configuration.</param>
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
: base(pipeline)
/// <param name="name">An optional name for the component.</param>
public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration, string name = nameof(AudioPlayer))
: base(pipeline, name)
{
this.pipeline = pipeline;
this.configuration = configuration;
Expand All @@ -58,10 +59,12 @@ public AudioPlayer(Pipeline pipeline, AudioPlayerConfiguration configuration)
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configurationFilename">The component configuration file.</param>
public AudioPlayer(Pipeline pipeline, string configurationFilename = null)
/// <param name="name">An optional name for the component.</param>
public AudioPlayer(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioPlayer))
: this(
pipeline,
(configurationFilename == null) ? new AudioPlayerConfiguration() : new ConfigurationHelper<AudioPlayerConfiguration>(configurationFilename).Configuration)
(configurationFilename == null) ? new AudioPlayerConfiguration() : new ConfigurationHelper<AudioPlayerConfiguration>(configurationFilename).Configuration,
name)
{
}

Expand Down
11 changes: 7 additions & 4 deletions Sources/Audio/Microsoft.Psi.Audio.Windows/AudioResampler.cs
Expand Up @@ -51,8 +51,9 @@ public sealed class AudioResampler : ConsumerProducer<AudioBuffer, AudioBuffer>,
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configuration">The component configuration.</param>
public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configuration)
: base(pipeline)
/// <param name="name">An optional name for the component.</param>
public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configuration, string name = nameof(AudioResampler))
: base(pipeline, name)
{
this.configuration = configuration;
this.currentInputFormat = configuration.InputFormat;
Expand All @@ -73,10 +74,12 @@ public AudioResampler(Pipeline pipeline, AudioResamplerConfiguration configurati
/// </summary>
/// <param name="pipeline">The pipeline to add the component to.</param>
/// <param name="configurationFilename">The component configuration file.</param>
public AudioResampler(Pipeline pipeline, string configurationFilename = null)
/// <param name="name">An optional name for the component.</param>
public AudioResampler(Pipeline pipeline, string configurationFilename = null, string name = nameof(AudioResampler))
: this(
pipeline,
(configurationFilename == null) ? new AudioResamplerConfiguration() : new ConfigurationHelper<AudioResamplerConfiguration>(configurationFilename).Configuration)
(configurationFilename == null) ? new AudioResamplerConfiguration() : new ConfigurationHelper<AudioResamplerConfiguration>(configurationFilename).Configuration,
name)
{
}

Expand Down
22 changes: 14 additions & 8 deletions Sources/Audio/Microsoft.Psi.Audio.Windows/Operators.cs
Expand Up @@ -17,22 +17,28 @@ public static class Operators
/// <param name="source">A stream of audio to be resampled.</param>
/// <param name="configuration">The resampler configuration.</param>
/// <param name="deliveryPolicy">An optional delivery policy.</param>
/// <param name="name">An optional name for the stream operator.</param>
/// <returns>A stream of resampled audio.</returns>
public static IProducer<AudioBuffer> Resample(this IProducer<AudioBuffer> source, AudioResamplerConfiguration configuration, DeliveryPolicy<AudioBuffer> deliveryPolicy = null)
{
return source.PipeTo(new AudioResampler(source.Out.Pipeline, configuration), deliveryPolicy);
}
public static IProducer<AudioBuffer> Resample(
this IProducer<AudioBuffer> source,
AudioResamplerConfiguration configuration,
DeliveryPolicy<AudioBuffer> deliveryPolicy = null,
string name = nameof(Resample))
=> source.PipeTo(new AudioResampler(source.Out.Pipeline, configuration, name), deliveryPolicy);

/// <summary>
/// Resamples an audio stream.
/// </summary>
/// <param name="source">A stream audio to be resampled.</param>
/// <param name="outputFormat">The desired audio output format for the resampled stream.</param>
/// <param name="deliveryPolicy">An optional delivery policy.</param>
/// <param name="name">An optional name for the stream operator.</param>
/// <returns>A stream of resampled audio.</returns>
public static IProducer<AudioBuffer> Resample(this IProducer<AudioBuffer> source, WaveFormat outputFormat, DeliveryPolicy<AudioBuffer> deliveryPolicy = null)
{
return Resample(source, new AudioResamplerConfiguration() { OutputFormat = outputFormat }, deliveryPolicy);
}
public static IProducer<AudioBuffer> Resample(
this IProducer<AudioBuffer> source,
WaveFormat outputFormat,
DeliveryPolicy<AudioBuffer> deliveryPolicy = null,
string name = nameof(Resample))
=> Resample(source, new AudioResamplerConfiguration() { OutputFormat = outputFormat }, deliveryPolicy, name);
}
}

0 comments on commit ae2f887

Please sign in to comment.