OSDN Git Service
Multithread safety and code reduction
Remove unsafe GenericPlayer::getSampleRate(). getSampleRate() was not
thread-safe as it accessed a member variable updated in the looper thread
without a lock. If getSampleRate() is ever needed again, the sample rate
is available in the mPcmFormatValues array, which does have a lock.
Replace member variables mChannelMask, mChannelCount, and mSampleRateHz
by local variables for locality and performance.
Change-Id: Ibf92ed090430153d748ded4d0b835e429df47eea