philburk / android-midisuite

Android MIDI test programs and examples.
Apache License 2.0
153 stars 53 forks source link

SynthExample should default to low latency #51

Closed philburk closed 3 years ago

philburk commented 5 years ago

If the MidiKeyboard app is started and then connected to the SynthExample then the latency is high.

But if the SynthExample app is started first and then connected to a USB MIDI Keyboard then the latency is low.

See internal Android bug b/70851203 | SynthExample audio latency unexpectedly high, 240 msec, app bug

philburk commented 3 years ago

REPRODUCE

  1. Launch OboeTester on a second phone.
  2. Start EXTRAS >> EXTERNAL TAP test.
  3. Make sure SynthExample is not running.
  4. Launch MIDI Keyboard app.
  5. Select Mobileer SynthExample as the receiver.
  6. Turn up volume.
  7. Tap keyboard loudly to make a note sound.
  8. Quickly hit ANALYZE button on second phone.
  9. Repeat to get an average latency. (I measured 240 msec.)
  10. Deselect Synth Example from Keyboard receiver menu.
  11. Make sure SynthExample is not running.
  12. Press STOP and START on second phone to clear stats.
  13. Launch MIDI SynthExample app.
  14. Select any Sender in the menu to launch the service.
  15. Select "-----" as the Sender.
  16. Press HOME button to send SynthExample to the background.
  17. Launch MIDI Keyboard app.
  18. Select Mobileer SynthExample as the receiver.
  19. Tap keyboard loudly to make a note sound.
  20. Quickly hit ANALYZE button on second phone.
  21. Repeat to get an average latency. (I measured 55 msec.)

EXPECT: both measurements to be the same.

ACTUAL: first one was much higher.