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:
Start an Oboe based App playing.
Do something in the app so you hear sound.
Use Home button to hide App
EXPECT - sound should stop unless it was designed for background operation
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.
Launch OboeTester
Press TEST OUTPUT
Press OPEN then START
Note that the stream is "MMAP SH". It is shared because App's EXCLUSIVE stream was stolen and shared with OboeTester.
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:
EXPECT - sound should stop unless it was designed for background operation
EXPECT - stream should be closed to free up audio resources
If the app is holding a stream open then continue this test.
EXPECT - hear sound, see response in UI