Description
openedon Jan 18, 2021
I was ready to write a crash report on Oboe 1.5.0, when I realized that my code calling getTimestamp(CLOCK_MONOTONIC, 0, 0) was wrong. I thought I probably copied it quite some time ago from example code and indeed, PlayAudioEngine.cpp of the hello-oboe sample contains it as well:
mIsLatencyDetectionSupported = (mPlayStream->getTimestamp(CLOCK_MONOTONIC, 0, 0) !=
oboe::Result::ErrorUnimplemented);
In FilterAudioStream.h, this leads to a crash in:
*framePosition = childPosition * mRateScaler;
or perhaps
getTimeStamp(clockId, &childPosition, timeNanoseconds);
if something is done using timeNanoseconds in that call.
Don't know why it survived in my app all the time and only started crashing with 1.5.0, but perhaps some null pointer checks are in order here. At least the sample code should be changed.