Releases: google/oboe
1.9.3
API changes
- Added setting shared pointers to FullDuplexStream and deprecated raw pointers. (#2034)
- Fixed a deadlock in OpenSL ES when stopping a stream. (#2061)
- Added AudioClock so apps can easily get the current timestamp and sleep until a given timestamp or for a certain amount of time. (#2080)
- Added compile flag for statically linking OpenSL ES (#2112, #2115)
- Added the ability report its workload to audio streams. This will help with glitches when you suddenly increase the performance load. (#2116)
- Updated to 16kb page sizes. This is needed for Android 15 as some devices only support 16kb page sizes. (#2126, #2084, #2086)
OboeTester
- Added a Rapid Cycle test to help with testing stream stops and starts in succession. (#2042, #2060)
- Made some improvements in DataPaths tests. (#2045, #2047, #2069, #2073, #2074, #2083, #2088)
- Fixed an issue where action bars were set to light. (#2048)
- Fixed an issue where some tests could switch to landscape mode when all tests should be in portrait mode. (#2049)
- Added ro.build.date to MainActivity. (#2053)
- Fixed an issue where sounds could get too high pitched when there were too many channels. (#2067)
- Added ForegroundService so OboeTester can record in the background. (#2071, #2076, #2100, #2106)
- Added the actual device id to the UI after a stream is created. (#2078)
- Added AEC, AGC, and NoiseSupressor effects. (#2091)
- Added bluetooth and telephony features to device report. (#2094)
- Added Intents to CPU Load test. This will allow developers to automate testing this test. (#2104)
Samples
1.9.0
API changes
- Fixed a problem with isMMapEnabled() not returning correctly when setMMapEnabled() is never called. (#1968)
- Fixed an out-of-bounds read in the sample rate converter. (#2009)
- Removed OpenSL ES direct links as it's deprecated. (#2014)
- Enable sample rate conversion by default to reduce latency. (#2024)
- Fixes a problem with crashes on disconnect. (#2037)
OboeTester
- Let OboeTester channel count and mask override each other. (#1973)
- Added MediaCodecInfo in device report. (#1998)
- Fixed a buffer calculation in FormatConversionBox. (#2012)
- Use AppCompatSpinner and AppCompatActivity. (#2019)
- Improved OboeTester Disconnect (#1964), Data Paths (#1963, #1978, #2013), Glitch (#1963) tests
Samples
- Support 24 and 32 bit in wav file parser for DrumThumper (#1993)
1.8.1
1.8.0
API changes
- Deprecated
AudioStreamBuilder.setCallback
. Please usesetDataCallback
andsetErrorCallback
- Added
getHardwareChannelCount
,getHardwareSampleRate
, andgetHardwareFormat
to audio streams. They are supported in AAudio in API 34+. (#1744) - Added privacy sensitive mode APIs. They are supported in AAudio in API 30+. (#1751)
- Added
release
to audio streams. They are supported in AAudio in API 30+. (#1755) - Added IEC61937 support. They are supported in AAudio in API 34+. (#1758)
- Added allow capture policy APIs. They are supported in AAudio in API 29+. (#1768)
- Added APIs to declare spatialization behavior. They are supported in AAudio in API 32+. (#1776)
- Added ADPF support in Oboe. (#1788)
- Added full duplex stream to Oboe. (#1920)
Bug fixes
- Fixed an issue where Oboe was waiting for more frames than could be possibly available (#1702, Fixes #1701)
- AAudio could sometimes return a positive number as an error code. Oboe now changes these to ErrorInternal. (#1711)
- Fixed an issue where the resampler was causing sound the be muffled. (#1813, Fixes #1673, #1625)
- Fixed an issue where some parameters were not copied in FilterAudioStream. (#1898, Fixes #1897)
OboeTester
1.7.0
API changes
- Channel mask support is supported for AAudio in API 32 and above (#1548)
- Add methods
setDelayBeforeCloseMillis
andgetDelayBeforeCloseMillis
to audio streams (#1593) - Add OboeExtensions (#1602). These will allow you to query for, enable, and disable MMAP support.
- Add shared_ptr support for
setDataCallback
andsetErrorCallback
(#1626). The equivalent for raw pointers is now deprecated. This helps avoid crashes by preventing the callback from being deleted while the error callback is still active.
OpenSL ES bug fixes
- Fixed an issue with OpenSL ES queuing only one callback buffer (#1245, Fixes #1165)
- Fixed an issue with OpenSL ES volume not working if Usage was Unspecified (#1537, Fixes #1536)
- Fixed an issue with OpenSL ES where resources were not closed if open failed (#1550, Fixes #1550)
- Fixed an issue with OpenSL ES not handling processBufferCallback() from multiple threads correctly (#1570, #1621, Fixes #1567)
- Fixed an issue with OpenSL ES returning 0 from getBufferSizeInFrames() if callbacks are not used (#1582, Fixes #1581)
- Fixed an issue with OpenSL ES not handling large buffers gracefully (#1601, Fixes #744, #952)
- Fixed an issue with OpenSL ES input streams not checking buffer depths (#1621, Fixes #1431)
- Fixed an issue with OpenSL ES returning ErrorInternal for invalid formats (#1634)
Other bug fixes
- Fixed an issue with AAudio segfaults if closed while reading or writing (#1497, Fixes #1484)
- Fixed resampler glitches for some configurations (#1624, Fixes #1622)
Workarounds
- Add Quirk to disable MMAP on Exynos SDM8150 (#1381, Fixes #1381)
- Add Quirks for Vivo devices (#1590, Fixes #201)
- Check for workaround flag for automatic INT16 to FLOAT conversion when FLOAT is not supported (#1590, Fixes #1589)
Code samples
Non core changes
- Many OboeTester updates
- API reference docs are automatically updated after API changes
- Add RISC-V support to StablizedCallback.h (#1586)
- Updated Oboe to support API 33 (#1618)
1.6.1
API changes
- Add methods
setPackageName
andsetAttributionTag
(#1332). These methods allow you to pass your package name and/or a tag when creating an audio stream. Android will output these strings in system logs to make it easier to attribute system calls back to your application.
Bug fixes and workarounds
- Fixed an issue where an incorrect audio device ID could be used if sample rate conversion is also used (#1310)
- flowgraph: Start linear ramps at the initial volume set (#1318)
- fix unused-parameter warnings (#1331)
- Add workaround for Samsung Galaxy S9 recording silence sometimes. Fixes #1110
- Improve callback stop handling on pre-R devices (#1351, Fixes #1230)
- Remove include of ndk-version.h (#1359, #Fixes #1358)
Binary changes
- The Oboe libraries are now built with debug information to assist with debugging. This information is stripped automatically by Android Studio in release builds so there's no APK bloat. Fixes #1301.
Non core changes
- Many updates to OboeTester
- Code samples now use Float to Int16 conversion on API <21
- Github repo default branch renamed from
master
tomain
1.6.0
- Add support for 24 and 32 bit sample formats. Support in AAudio will be added to Android 12. This was added to support some codecs that generate 24-bit output. We still recommend using Float format for most high-resolution use cases. (8041b38)
- Add support for float output streams on pre-L devices (#1267)
- Fix calculation related to sample rate conversion (#1256, thanks to @flamme and @chrismanchester)
- Check for nullptr in FilterAudioStream::getTimestamp() (#1171, Fixes #1166)
- Android TV improvements (a65df53, thanks to @ftsui)
- Oboe now requires C++17 to be built from source (binaries available on https://maven.google.com/)
- Add quirk for S20 input (Fixes #892)
- Add quirk for Exynos850 devices (2c06e95)
- Remove call to
dlclose
, avoids possible segfault (2ca99f6) - Fix possible, but very unlikely, race on close (#1200)
1.5.0
API changes
New callback classes
Added new classes AudioStreamDataCallback
and AudioStreamErrorCallback
. These classes replace AudioStreamCallback
which is now deprecated. The new callback classes separate the responsibilities of data handling and error handling.
Additionally, AudioStreamErrorCallback
includes a new onError
method. This allows you to override the default error handling and stop/close the audio stream yourself. More details.
New features
- Channel count conversion. Oboe now includes a
ChannelCountConverter
. This is part of theflowgraph
library. It can be used directly for performing channel count conversion. Internally this class is used to handle situations where opening a stream with a specific channel count results in suboptimal performance. For example, some devices cannot obtain a low latency mono input stream so Oboe opens the stream in stereo and performs a seamless stereo->mono conversion for the application. [commit, PR] - Set a minimum buffer size for LatencyTuner. Added method
LatencyTuner::setMinimumBufferSize
which allows you to set the minimum buffer size in frames. This stops the LatencyTuner from reducing the buffer size below a user-defined threshold. Note that the value specified for the minimum buffer size should be an integer multiple of the burst size. [PR]
Bug fixes / workarounds
- If you attempt to open an AAudio input stream without the relevant permission Oboe will now output a more useful error message. [commit]
- Fixed a race condition that could cause a crash during close() if a callback was still running. [PR]
- Fixed an issue with the sample rate converter which could cause input streams using callbacks to stall. [issue, commit]
- Fixed several crashes associated with using
setFramesPerCallback
. [commit] - Fixed a bug that could cause
stop()
of an OpenSL ES stream with a non-zero timeout value to spin forever. [original issue] - In cases where the
VoicePerformance
input preset is not supported (OpenSL ES and Android P and below) Oboe will use theVoiceRecognition
preset instead. [commit, commit] - In Android RQ1A a regression was introduced which meant that when a stream disconnects (e.g. headphones unplugged) a TIMEOUT error code was supplied rather than the expected DISCONNECT. This only affects SHARED AAudio MMAP streams. Oboe works around this by returning a DISCONNECT error code if a TIMEOUT error code is received on RQ1A. [commit]
- Fixed a potential race condition when closing an OpenSL ES stream. [PR]
- Fixed a problem where AAudio might accidentally call the flowgraph units in Oboe instead of in AAudio. [PR]
- Added a workaround for broken mono recording on Samsung S9. [PR]
Documentation and samples updates
- [docs] Added the OpenSL ES migration guide.
- [all samples] Standardise package name to
com.google.oboe.samples
- [hello-oboe] Save user settings, use shared stream, use locks to prevent race conditions [commit]
- [RhythmGame] Updates to the FFmpeg extractor and decoder [commit, commit]
- [DrumThumper] Audio is resampled on app load to avoid resampling penalty during playback [commit]
- [DrumThumper] App is now published on Play Store.
- [parselib] Fixed a problem with parsing unexpected chunks in a WAV file. [issue]
- [OboeTester] can now print a device and microphone report.
All commits since 1.4.3: 1.4.3...1.5.0
How to update existing code
On previous version of Oboe you implement AudioStreamCallback
and override onAudioReady
for data handling and the onError*
methods for error handling.
In Oboe 1.5 data callbacks and error callbacks have been split into 2 separate classes. To migrate your code, create an AudioStreamDataCallback
and an AudioStreamErrorCallback
. Then copy the code from your existing AudioStreamCallback
implementation to the new methods, as per the following table:
Deprecated method | New method |
AudioStreamCallback::onAudioReady
|
AudioStreamDataCallback::onAudioReady
|
AudioStreamCallback::onErrorBeforeClose
|
AudioStreamErrorCallback::onErrorBeforeClose
|
AudioStreamCallback::onErrorAfterClose
|
AudioStreamErrorCallback::onErrorAfterClose
|
Corresponding setDataCallback
and setErrorCallback
methods have been added to AudioStreamBuilder
and you must use these in place of setCallback
.
The term "callback" within Oboe is now ambiguous so the following methods have been renamed to refer specifically to the data callback. If you're using any *FramesPerCallback
methods, you should use the new methods instead.
Deprecated method | New method |
AudioStreamBuilder::setFramesPerCallback
|
AudioStreamBuilder::setFramesPerDataCallback
|
AudioStream::getFramesPerCallback
|
AudioStream::setFramesPerDataCallback
|
For further guidance take a look at this PR which updates the Oboe sample code.
1.4.3
1.4.2
We fixed issue #535, which caused an intermittent crash in releaseBuffer()
when a headset was plugged in. This mostly affected OpenSL ES. But it could affect AAudio if you called stream->getFramesRead()
or stream->getTimeStamp()
from an output stream callback. This was a serious crash that affected many apps. So we strongly recommend upgrading to Oboe 1.4.2. Here is a Tech Note that describes the issue in more detail.
We fixed issue #820, which could cause a stream to get deleted while it was in use by an onError
callback. We now use a std::shared_ptr
to hold the stream and strongly recommend using the following technique to open a stream:
std::shared_ptr<oboe::AudioStream> oboeStream; // hold onto this, maybe in an instance variable
Result result = builder.openStream(oboeStream);
Oboe error, warning and information log messages are now enabled in release builds.
We updated QuirksManager
to handle specific device requirements. Some devices, for example, may require a different minimum number of bursts in their buffer. #734
Added “DrumThumper”, an interactive drum pad sample app. It demonstrates how to load drum sounds from WAV files, and how to mix multiple drums to one stream. See samples/DrumThumper.
For OpenSL ES, we now scale the buffer size by the sample rate so that it will better match the internal buffer sizes. The default is based on a 20 msec period common on Android. This will reduce glitching when using OpenSL ES.
#762
The LiveEffect sample app now handles a failure to open the stream. It used to crash. #796