Simplify AudioTrack event handling and fix a race
Fixed race where mEventHandlerDelegate was accessed multiple times with an assumption that all values read were the same. If setPlaybackPositionUpdateListener was called with a null listener, it did not update the delegate. Inner classes can access final local variables of the enclosing method. Use this to remove fields mPositionListener, mPositionListenerLock, mListener. Change-Id: Ibf5cae61a1a9d21b745b90d4b74f9be14b66e37b
Loading
Please register or sign in to comment