简体   繁体   English

如何在Windows 10 UWP应用程序中播放(MIDI)声音?

[英]How do you play a (MIDI) sound in a Windows 10 UWP App?

I just started to work with Visual Studio Community 2015 and was trying to create a simple virtual piano app that plays the respective key when clicked. 我刚刚开始使用Visual Studio Community 2015并尝试创建一个简单的虚拟钢琴应用程序,在点击时播放相应的键。 I already have the layout for the keys but I can't find anything on how to make an actual sound. 我已经有了键的布局,但我找不到任何关于如何制作实际声音的内容。 I'm working with Visual C# and apparently the System.Media namespace doesn't work with apps so I ran out of possibilities. 我正在使用Visual C#,显然System.Media命名空间不适用于应用程序,所以我用尽了可能性。

Is there an alternative with UWP apps? UWP应用程序有替代品吗?

You can use Windows.Device.Midi to play. 您可以使用Windows.Device.Midi播放。 Here's the link : https://msdn.microsoft.com/en-us/windows/uwp/audio-video-camera/midi 这是链接: https//msdn.microsoft.com/en-us/windows/uwp/audio-video-camera/midi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用启动Windows Phone时如何播放声音 - How do I play sound when app begins windows phone 如何在另一个UWP-App(在Windows 10下)的Webview中显示UWP-App? - How do i display a UWP-App in a Webview in another UWP-App (under Windows 10)? 你如何在C#中播放声音? - How do you play sound in C#? 如何在Windows 10 UWP应用中更改根框架导航的页面名称? - How do I change the page name for the root frame navigation in a Windows 10 UWP app? 如何在用 c# 编写的 UWP 应用程序中从 Windows 运行时组件 (c#) 调用函数? - How do you call functions from a Windows Runtime Component (c#) in a UWP app written in c#? 如何从Universal Windows App中使用BackgroundMediaPlayer播放内部声音 - How to play an internal sound with BackgroundMediaPlayer from my Universal Windows App 如何在Windows Universal应用程序中播放Assets中的声音 - how to play sound from Assets in windows universal app 如何在Windows 10移动应用中使用LumiaImagingSDK.UWP 3.0? - How to work with LumiaImagingSDK.UWP 3.0 in windows 10 mobile app? 如何以编程方式退出或关闭 UWP 应用程序? (Windows 10) - How to exit or close an UWP app programmatically? (Windows 10) 如何从 Windows 10 UWP 应用程序连接到 SQL 服务器数据库 - How to connect to SQL server database from a Windows 10 UWP app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM