atsushieno / managed-midi

[Past project] Cross-platform MIDI processing library for mono and .NET (ALSA, CoreMIDI, Android, WinMM and UWP).
MIT License
195 stars 26 forks source link

Don't see a way to get a real IMidiAccessManager on UWP #37

Closed voxoid0 closed 5 years ago

voxoid0 commented 5 years ago

Hi. In my UWP (Xamarin.Forms) app, MidiAccessManager.Default returns an instance of EmptyMidiAccess . How can I get an instance of the UwpAccessManager? Presumably that is what I want, and I don't know of a way to directly instantiate it by depending on the nuget package.

atsushieno commented 5 years ago

Hi. Maybe you are referencing managed-midi from a netstandard package? managed-midi needs to be directly referenced from the Uwp project so that the Uwp version of the assembly is resolved. The netstandard version is a "bait" part of it which contains only Empty MidiAccess.

voxoid0 commented 5 years ago

Hmm, I'm referencing it from the UWP app, and from a class within that project I cannot access UwpAccessManager nor its namespace Commons.Music.Midi.UwpWithStub.Commons.Music.Midi.UwpMidi

atsushieno commented 5 years ago

Okay, I think I found out why. Let me push possible fix and update package.

atsushieno commented 5 years ago

1.9.2 will (1) contain Commons.Music.Midi.UwpMidi.UwpMidiAccess (as well as the old one in the bogus namespace) and (2) it will be set as MidiAccessManager.Default. Thanks for the report!

voxoid0 commented 5 years ago

Nice, thanks for your fast help!