From 4dbffa497bee39d8e7ac4e9ba91431d036227212 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 1 Feb 2020 10:53:39 +0900 Subject: [PATCH] Not sure is this useful. Not need in ruleset now. --- .../Input/Bindings/IMicrophoneAction.cs | 18 ++++++++++++++++++ .../Bindings/MicrophoneKeyBindingContainer.cs | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 osu.Framework.Microphone/Input/Bindings/IMicrophoneAction.cs create mode 100644 osu.Framework.Microphone/Input/Bindings/MicrophoneKeyBindingContainer.cs diff --git a/osu.Framework.Microphone/Input/Bindings/IMicrophoneAction.cs b/osu.Framework.Microphone/Input/Bindings/IMicrophoneAction.cs new file mode 100644 index 0000000..f3b0de7 --- /dev/null +++ b/osu.Framework.Microphone/Input/Bindings/IMicrophoneAction.cs @@ -0,0 +1,18 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace osu.Framework.Input.Bindings +{ + public interface IMicrophoneAction + { + /// + /// Detected pitch + /// + public double Pitch { get; set; } + + /// + /// Detected volumn + /// + public float Volumn { get; set; } + } +} diff --git a/osu.Framework.Microphone/Input/Bindings/MicrophoneKeyBindingContainer.cs b/osu.Framework.Microphone/Input/Bindings/MicrophoneKeyBindingContainer.cs new file mode 100644 index 0000000..0cc99b3 --- /dev/null +++ b/osu.Framework.Microphone/Input/Bindings/MicrophoneKeyBindingContainer.cs @@ -0,0 +1,18 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Input.Events; +using System.Collections.Generic; + +namespace osu.Framework.Input.Bindings +{ + public class MicrophoneKeyBindingContainer : KeyBindingContainer where T : struct, IMicrophoneAction + { + public override IEnumerable DefaultKeyBindings => new List(); + + protected override bool Handle(UIEvent e) + { + return base.Handle(e); + } + } +}