在Centennial(桌面桥)UWP应用程序中播放Midi [英] Playing Midi in Centennial (desktop bridge) UWP apps

查看:62
本文介绍了在Centennial(桌面桥)UWP应用程序中播放Midi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码在我的"桌面"中播放Midi音符。应用程序。它工作正常。但是,如果我通过桌面桥(https://developer.microsoft.com/en-us/windows/bridges/desktop)使用该应用程序,它将不再有效。我没有收到任何错误,但是
只是没有声音?

I use the code below to play a Midi note in my "desktop" app. It works fine. But if I take the app through the Desktop Bridge (https://developer.microsoft.com/en-us/windows/bridges/desktop ) it no longer works. I don't get any errors but there is just no sound?

我很感激任何想法。

谢谢

使用系统;

使用System.Runtime.InteropServices;

使用System.Windows.Forms;
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

推荐答案

传统MIDI API(midiOutOpen)在Centennialized应用程序中不起作用。请upvote此问题报告

The legacy MIDI API (midiOutOpen) does not work in Centennialized apps. Please upvote this problem report

https://aka.ms/ho8t0o " Windows Media Player应该能够;支持MIDI文件,另外还有
到其他媒体格式。"

https://aka.ms/ho8t0o "Windows Media Player should be able  to support MIDI files, in addition to the other media formats."

一种解决方法是转移到现代MIDI API - 这里有一个示例

A workaround is to move to the modern MIDI API - there is a sample here

https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/MIDI


这篇关于在Centennial(桌面桥)UWP应用程序中播放Midi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆