1*05767d91SRobert WuAndroid audio history 2*05767d91SRobert Wu=== 3*05767d91SRobert Wu 4*05767d91SRobert WuA list of important audio features, bugs, fixes and workarounds for various Android versions. [(List of all Android Versions)](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) 5*05767d91SRobert Wu 6*05767d91SRobert Wu### 11.0 R - API 30 7*05767d91SRobert Wu- Bug in **AAudio** on RQ1A (Oboe works around this issue from version 1.5 onwards). A stream is normally disconnected when a **headset is plugged in** or because of other device changes. An `AAUDIO_ERROR_DISCONNECTED` error code should be passed to the error callback. But a bug in Shared MMAP streams causes `AAUDIO_ERROR_TIMEOUT` to be returned. So if your error callback is checking for `AAUDIO_ERROR_DISCONNECTED` then it may not respond properly. We recommend **always stopping and closing the stream** regardless of the error code. Oboe does this. So if you are using Oboe callbacks you are OK. This issue was not in the original R release. It was introduced in RQ1A, which is being delivered by OTA starting in November 2020. It will be fixed in a future update. Follow it on [this public Android issue](https://issuetracker.google.com/173928197). 8*05767d91SRobert Wu 9*05767d91SRobert Wu- Fixed. A race condition in AudioFlinger could cause an assert in releaseBuffer() when a headset was plugged in or out. More details [here](https://github.com/google/oboe/wiki/TechNote_ReleaseBuffer) 10*05767d91SRobert Wu 11*05767d91SRobert Wu### 10.0 Q - API 29 12*05767d91SRobert Wu- Fixed: Setting capacity of Legacy input streams < 4096 can prevent use of FAST path. https://github.com/google/oboe/issues/183. Also fixed in AAudio with ag/7116429 13*05767d91SRobert Wu- Add InputPreset:VoicePerformance for low latency recording. 14*05767d91SRobert Wu- Regression bug: [AAudio] Headphone disconnect event not fired for MMAP streams. See P item below. Still in first Q release but fixed in some Q updates. 15*05767d91SRobert Wu 16*05767d91SRobert Wu### 9.0 Pie - API 28 (August 6, 2018) 17*05767d91SRobert Wu- AAudio adds support for setUsage(), setSessionId(), setContentType(), setInputPreset() for builders. 18*05767d91SRobert Wu- Regression bug: [AAudio] Headphone disconnect event not fired for MMAP streams. Issue [#252](https://github.com/google/oboe/issues/252) Also see tech note [Disconnected Streams](https://github.com/google/oboe/wiki/TechNote_Disconnect). 19*05767d91SRobert Wu- AAudio input streams with LOW_LATENCY will open a FAST path using INT16 and convert the data to FLOAT if needed. See: https://github.com/google/oboe/issues/276 20*05767d91SRobert Wu 21*05767d91SRobert Wu### 8.1 Oreo MR1 - API 27 22*05767d91SRobert Wu- Oboe uses AAudio by default. 23*05767d91SRobert Wu- AAudio MMAP data path enabled on Pixel devices. PerformanceMode::Exclusive supported. 24*05767d91SRobert Wu- Fixed: [AAudio] RefBase issue 25*05767d91SRobert Wu- Fixed: Requesting a stereo recording stream can result in sub-optimal latency. 26*05767d91SRobert Wu 27*05767d91SRobert Wu### 8.0 Oreo - API 26 (August 21, 2017) 28*05767d91SRobert Wu- [AAudio API introduced](https://developer.android.com/ndk/guides/audio/aaudio/aaudio) 29*05767d91SRobert Wu- Bug: RefBase issue causes crash after stream closed. This why AAudio is not recommended for 8.0. Oboe will use OpenSL ES for 8.0 and earlier. 30*05767d91SRobert Wu https://github.com/google/oboe/issues/40 31*05767d91SRobert Wu- Bug: Requesting a stereo recording stream can result in sub-optimal latency. [Details](https://issuetracker.google.com/issues/68666622) 32*05767d91SRobert Wu 33*05767d91SRobert Wu### 7.1 Nougat MR1 - API 25 34*05767d91SRobert Wu- OpenSL adds supports for setting and querying of PerformanceMode. 35*05767d91SRobert Wu 36*05767d91SRobert Wu### 7.0 Nougat - API 24 (August 22, 2016) 37*05767d91SRobert Wu- OpenSL method `acquireJavaProxy` added, which allows the Java AudioTrack object associated with playback to be obtained (which allows underrun count). 38*05767d91SRobert Wu 39*05767d91SRobert Wu### 6.0 Marshmallow - API 23 (October 5, 2015) 40*05767d91SRobert Wu- Floating point recording supported. But it does not allow a FAST "low latency" path. 41*05767d91SRobert Wu- [MIDI API introduced](https://developer.android.com/reference/android/media/midi/package-summary) 42*05767d91SRobert Wu- Sound output is broken on the API 23 emulator 43*05767d91SRobert Wu 44*05767d91SRobert Wu### 5.0 Lollipop - API 21 (November 12, 2014) 45*05767d91SRobert Wu- Floating point playback supported. 46*05767d91SRobert Wu 47*05767d91SRobert Wu 48*05767d91SRobert Wu 49*05767d91SRobert Wu 50