google / oboe

Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
Apache License 2.0
3.64k stars 554 forks source link

Post an article with a test suite that will work for any Oboe app #1880

Open philburk opened 1 year ago

philburk commented 1 year ago

We could test the app's response to plugging in headphones when the app is playing, or when stopped, or when in background. Also test interaction with other apps that may use MMAP.

For example:

  1. Start an Oboe based App playing.
  2. Do something in the app so you hear sound.
  3. Use Home button to hide App

EXPECT - sound should stop unless it was designed for background operation

  1. Enter: adb shell dumpsys media.audio

EXPECT - stream should be closed to free up audio resources

If the app is holding a stream open then continue this test.

  1. Launch OboeTester
  2. Press TEST OUTPUT
  3. Press OPEN then START
  4. Note that the stream is "MMAP SH". It is shared because App's EXCLUSIVE stream was stolen and shared with OboeTester.
  5. Press CLOSE
  6. Use HOME button to hide OboeTester
  7. Open App
  8. Start playing the App

EXPECT - hear sound, see response in UI

philburk commented 11 months ago

Some additional ideas:

  1. Does sound continue after plugging in or unplugging headphones.
  2. Does your app stop making sound when you start another foreground app like YouTube? "Audio Focus".
  3. If you rotate the device does the sound continue.
  4. If you have two apps side, what happens?
  5. Does your app respond correctly to volume keys?
  6. Does you app make sound if you enable Live Caption from the volume dialog?
  7. Can you record your app from the Screen Recorder?
  8. What happens to your audio when the display times out? Is that what you intended? Activity Life Cycle?