Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android USB Midi hotplug - no midi received on reconnect #93

Open
JBramauer opened this issue Dec 12, 2024 · 1 comment
Open

Android USB Midi hotplug - no midi received on reconnect #93

JBramauer opened this issue Dec 12, 2024 · 1 comment

Comments

@JBramauer
Copy link

JBramauer commented Dec 12, 2024

Setup:
AndroidMidiAccess
Google Pixel 8 with Android 15

Short description:
I need to connect to a device 2 times after USB unplug and replug before I receive data again.

Steps to reproduce the issue:

Part 1: Normal connect

  • Plug a USB MIDI device
  • connect via midiAccess.openInput and openOutput (returns a MidiInput/MidiOutput instance)
  • set listener on the input instance
  • Data is received. We're happy.

Part 2: unplug

  • Now unplug the device (we're listening to MidiAccess.stateChanged)
  • ports are not available anymore, cannot close the connection on our end, though, as the MidiInput/MidiOutput instances are already null

Part 3: re-plug and reconnect

  • Reconnect the USB device
  • we receive the state changed
  • connect again, we receive the correct device info and openInput returns a MidiInput instance
  • set listener on the input
  • listener does not receive anything

Part 4: try again - works

  • disconnect (close previous instance)
  • connect again
  • set listener
  • now we're receiving data
@JBramauer JBramauer changed the title Android SUB Midi hotplug - no midi received on reconnect Android USB Midi hotplug - no midi received on reconnect Dec 12, 2024
@atsushieno
Copy link
Owner

Thanks for reporting. I need a real MIDI device that can plug into and unplug from Android device to investigate that issue. Give me some time to consider the options for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants