You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
Ah, you are right. I copied 1.5.0 on top of 1.4.x and 1.4.x (or perhaps an even older version) had PlayAudioEngine.cpp which is not part of 1.5.0 anymore.
philburk
changed the title
Bug in example: getTimestamp()
Bug in example: getTimestamp(), FilterAudioStream.h needs a NULL check on framePosition
Jan 22, 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.
The text was updated successfully, but these errors were encountered: