AAudio AudioStreamLegacy: refine handling of AudioTrack teardown

Do not systematically request a stream disconnect upon
EVENT_NEW_IAUDIOTRACK received AudioTrack but only if the new
audio Track properties have changed in such a way that the initial
contract is broken.

Bug: 139763500
Test: OboeTester TEST DISCONNECT
Test: OboeTester TEST OUTPUT while enabling/disabling Live Caption
Change-Id: I3b43275a888e23471fcd1ce20725f5731a77a255
diff --git a/media/libaaudio/src/legacy/AudioStreamTrack.h b/media/libaaudio/src/legacy/AudioStreamTrack.h
index 550f693..93a1ff4 100644
--- a/media/libaaudio/src/legacy/AudioStreamTrack.h
+++ b/media/libaaudio/src/legacy/AudioStreamTrack.h
@@ -104,6 +104,10 @@
 
     // TODO add 64-bit position reporting to AudioTrack and use it.
     aaudio_wrapping_frames_t         mPositionWhenPausing = 0;
+
+    // initial AudioTrack frame count and notification period
+    int32_t mInitialBufferCapacity = 0;
+    int32_t mInitialFramesPerBurst = 0;
 };
 
 } /* namespace aaudio */