Lines Matching refs:mSndFile
35 struct SndFile *thiz = &thisAP->mSndFile;
47 count = sf_read_short(thiz->mSNDFILE, pBuffer, (sf_count_t) SndFile_BUFSIZE);
170 thiz->mSndFile.mPathname = uri;
177 thiz->mSndFile.mWhich = 0;
178 thiz->mSndFile.mSNDFILE = NULL;
179 // thiz->mSndFile.mMutex is initialized only when there is a valid mSNDFILE
180 thiz->mSndFile.mEOF = SL_BOOLEAN_FALSE;
191 if (NULL != audioPlayer->mSndFile.mSNDFILE) {
217 pthread_mutex_lock(&audioPlayer->mSndFile.mMutex);
219 (void) sf_seek(audioPlayer->mSndFile.mSNDFILE, (sf_count_t) (((long long) pos *
220 audioPlayer->mSndFile.mSfInfo.samplerate) / 1000LL), SEEK_SET);
221 audioPlayer->mSndFile.mEOF = SL_BOOLEAN_FALSE;
222 audioPlayer->mSndFile.mWhich = 0;
223 pthread_mutex_unlock(&audioPlayer->mSndFile.mMutex);
242 if (NULL != thiz->mSndFile.mPathname) {
243 thiz->mSndFile.mSfInfo.format = 0;
244 thiz->mSndFile.mSNDFILE = sf_open(
245 (const char *) thiz->mSndFile.mPathname, SFM_READ, &thiz->mSndFile.mSfInfo);
246 if (NULL == thiz->mSndFile.mSNDFILE) {
248 } else if (!SndFile_IsSupported(&thiz->mSndFile.mSfInfo)) {
249 sf_close(thiz->mSndFile.mSNDFILE);
250 thiz->mSndFile.mSNDFILE = NULL;
254 ok = pthread_mutex_init(&thiz->mSndFile.mMutex, (const pthread_mutexattr_t *) NULL);
261 thiz->mPlay.mDuration = (SLmillisecond) (((long long) thiz->mSndFile.mSfInfo.frames *
262 1000LL) / thiz->mSndFile.mSfInfo.samplerate);
263 thiz->mNumChannels = thiz->mSndFile.mSfInfo.channels;
264 thiz->mSampleRateMilliHz = thiz->mSndFile.mSfInfo.samplerate * 1000;
279 if (NULL != thiz->mSndFile.mSNDFILE) {
280 sf_close(thiz->mSndFile.mSNDFILE);
281 thiz->mSndFile.mSNDFILE = NULL;
283 ok = pthread_mutex_destroy(&thiz->mSndFile.mMutex);