Home | History | Annotate | Download | only in libopensles

Lines Matching refs:audioPlayer

135 /** \brief Check whether the partially-constructed AudioPlayer is compatible with libsndfile */
183 void audioPlayerTransportUpdate(CAudioPlayer *audioPlayer)
186 if (NULL != audioPlayer->mSndFile.mSNDFILE) {
188 object_lock_exclusive(&audioPlayer->mObject);
189 SLboolean empty = 0 == audioPlayer->mBufferQueue.mState.count;
191 audioPlayer->mPrefetchStatus.mLevel = 1000;
192 SLmillisecond pos = audioPlayer->mSeek.mPos;
194 audioPlayer->mSeek.mPos = SL_TIME_UNKNOWN;
196 if (pos > audioPlayer->mPlay.mDuration) {
197 pos = audioPlayer->mPlay.mDuration;
199 audioPlayer->mPlay.mLastSeekPosition = pos;
200 audioPlayer->mPlay.mFramesSinceLastSeek = 0;
202 audioPlayer->mPlay.mFramesSincePositionUpdate = 0;
204 object_unlock_exclusive(&audioPlayer->mObject);
209 IBufferQueue_Clear(&audioPlayer->mBufferQueue.mItf);
212 pthread_mutex_lock(&audioPlayer->mSndFile.mMutex);
214 (void) sf_seek(audioPlayer->mSndFile.mSNDFILE, (sf_count_t) (((long long) pos *
215 audioPlayer->mSndFile.mSfInfo.samplerate) / 1000LL), SEEK_SET);
216 audioPlayer->mSndFile.mEOF = SL_BOOLEAN_FALSE;
217 audioPlayer->mSndFile.mWhich = 0;
218 pthread_mutex_unlock(&audioPlayer->mSndFile.mMutex);
224 SndFile_Callback(&audioPlayer->mBufferQueue.mItf, audioPlayer);