adamnemecek / WebMIDIKit

Simplest MIDI Swift library
MIT License
147 stars 27 forks source link

Remove assertion for disconnect #40

Open DivineDominion opened 1 year ago

DivineDominion commented 1 year ago

https://github.com/adamnemecek/WebMIDIKit/blob/6f3506937c141f04edaaa182502984d7baaa2e26/Sources/WebMIDIKit/MIDIPortMap.swift#L70

This assertion fires when you unplug a MIDI device of which a port is used.

I think removing this cause for runtime exceptions in DEBUG builds is a good fit (because the assumption that the device is still connected isn't always true!) and cannot gracefully be handled at all.

DivineDominion commented 1 year ago

@adamnemecek Gentle ping: what do you think about removing this?