• Home
  • Raw
  • Download

Lines Matching refs:pAudioPlayer

933 SLresult android_audioPlayer_checkSourceSink(CAudioPlayer *pAudioPlayer)  in android_audioPlayer_checkSourceSink()  argument
936 pAudioPlayer->mAndroidObjType = audioPlayer_getAndroidObjectTypeForSourceSink(pAudioPlayer); in android_audioPlayer_checkSourceSink()
937 if (INVALID_TYPE == pAudioPlayer->mAndroidObjType) { in android_audioPlayer_checkSourceSink()
941 const SLDataSource *pAudioSrc = &pAudioPlayer->mDataSource.u.mSource; in android_audioPlayer_checkSourceSink()
942 const SLDataSink *pAudioSnk = &pAudioPlayer->mDataSink.u.mSink; in android_audioPlayer_checkSourceSink()
985 if (df_pcm->endianness != pAudioPlayer->mObject.mEngine->mEngine.mNativeEndianness) { in android_audioPlayer_checkSourceSink()
1076 if (pAudioPlayer->mAndroidObjType != AUDIOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE) { in android_audioPlayer_checkSourceSink()
1091 if (pAudioPlayer->mAndroidObjType != AUDIOPLAYER_FROM_ADTS_ABQ_TO_PCM_BUFFERQUEUE) { in android_audioPlayer_checkSourceSink()
1274 void android_audioPlayer_create(CAudioPlayer *pAudioPlayer) { in android_audioPlayer_create() argument
1278 assert(INVALID_TYPE != pAudioPlayer->mAndroidObjType); in android_audioPlayer_create()
1284 pAudioPlayer->mAndroidObjState = ANDROID_UNINITIALIZED; in android_audioPlayer_create()
1285 pAudioPlayer->mSessionId = (audio_session_t) android::AudioSystem::newAudioUniqueId( in android_audioPlayer_create()
1291 pAudioPlayer->mStreamType = ANDROID_DEFAULT_OUTPUT_STREAM_TYPE; in android_audioPlayer_create()
1294 pAudioPlayer->mCallbackProtector = new android::CallbackProtector(); in android_audioPlayer_create()
1298 pAudioPlayer->mAuxSendLevel = 0; in android_audioPlayer_create()
1299 pAudioPlayer->mAmplFromDirectLevel = 1.0f; // matches initial mDirectLevel value in android_audioPlayer_create()
1300 pAudioPlayer->mDeferredStart = false; in android_audioPlayer_create()
1306 switch (pAudioPlayer->mAndroidObjType) { in android_audioPlayer_create()
1308 pAudioPlayer->mPlaybackRate.mMinRate = AUDIOTRACK_MIN_PLAYBACKRATE_PERMILLE; in android_audioPlayer_create()
1309 pAudioPlayer->mPlaybackRate.mMaxRate = AUDIOTRACK_MAX_PLAYBACKRATE_PERMILLE; in android_audioPlayer_create()
1312 pAudioPlayer->mPlaybackRate.mMinRate = MEDIAPLAYER_MIN_PLAYBACKRATE_PERMILLE; in android_audioPlayer_create()
1313 pAudioPlayer->mPlaybackRate.mMaxRate = MEDIAPLAYER_MAX_PLAYBACKRATE_PERMILLE; in android_audioPlayer_create()
1380 static bool canUseFastTrack(CAudioPlayer *pAudioPlayer) in canUseFastTrack() argument
1382 assert(pAudioPlayer->mAndroidObjType == AUDIOPLAYER_FROM_PCM_BUFFERQUEUE); in canUseFastTrack()
1409 if (IsInterfaceInitialized(&pAudioPlayer->mObject, blacklist[i])) { in canUseFastTrack()
1435 if (IsInterfaceInitialized(&pAudioPlayer->mObject, mph)) { in canUseFastTrack()
1452 SLresult android_audioPlayer_realize(CAudioPlayer *pAudioPlayer, SLboolean async) { in android_audioPlayer_realize() argument
1455 SL_LOGV("Realize pAudioPlayer=%p", pAudioPlayer); in android_audioPlayer_realize()
1458 app.sessionId = pAudioPlayer->mSessionId; in android_audioPlayer_realize()
1459 app.streamType = pAudioPlayer->mStreamType; in android_audioPlayer_realize()
1461 switch (pAudioPlayer->mAndroidObjType) { in android_audioPlayer_realize()
1469 pAudioPlayer->mDynamicSource.mDataSource->pFormat; in android_audioPlayer_realize()
1493 if (canUseFastTrack(pAudioPlayer)) { in android_audioPlayer_realize()
1497 notificationFrames = -pAudioPlayer->mBufferQueue.mNumBuffers; in android_audioPlayer_realize()
1504 pAudioPlayer->mAudioTrack = new android::AudioTrack( in android_audioPlayer_realize()
1505 pAudioPlayer->mStreamType, // streamType in android_audioPlayer_realize()
1512 (void *) pAudioPlayer, // user in android_audioPlayer_realize()
1514 pAudioPlayer->mSessionId); in android_audioPlayer_realize()
1515 android::status_t status = pAudioPlayer->mAudioTrack->initCheck(); in android_audioPlayer_realize()
1520 pAudioPlayer->mAudioTrack.clear(); in android_audioPlayer_realize()
1526 pAudioPlayer->mNumChannels = df_pcm->numChannels; in android_audioPlayer_realize()
1527 pAudioPlayer->mSampleRateMilliHz = df_pcm->samplesPerSec; // Note: bad field name in SL ES in android_audioPlayer_realize()
1530 pAudioPlayer->mAndroidObjState = ANDROID_READY; in android_audioPlayer_realize()
1536 if (pAudioPlayer->mAndroidConfiguration.mRoutingProxy != NULL && in android_audioPlayer_realize()
1542 j_env->CallVoidMethod(pAudioPlayer->mAndroidConfiguration.mRoutingProxy, in android_audioPlayer_realize()
1544 pAudioPlayer->mAudioTrack.get()); in android_audioPlayer_realize()
1556 pAudioPlayer->mAPlayer = new android::LocAVPlayer(&app, false /*hasVideo*/); in android_audioPlayer_realize()
1557 pAudioPlayer->mAPlayer->init(sfplayer_handlePrefetchEvent, in android_audioPlayer_realize()
1558 (void*)pAudioPlayer /*notifUSer*/); in android_audioPlayer_realize()
1560 switch (pAudioPlayer->mDataSource.mLocator.mLocatorType) { in android_audioPlayer_realize()
1571 const char *uri = (const char *)pAudioPlayer->mDataSource.mLocator.mURI.URI; in android_audioPlayer_realize()
1587 pAudioPlayer->mAPlayer->setDataSource(fd, 0, statbuf.st_size, true); in android_audioPlayer_realize()
1595 pAudioPlayer->mAPlayer->setDataSource(uri); in android_audioPlayer_realize()
1598 int64_t offset = (int64_t)pAudioPlayer->mDataSource.mLocator.mFD.offset; in android_audioPlayer_realize()
1599 pAudioPlayer->mAPlayer->setDataSource( in android_audioPlayer_realize()
1600 (int)pAudioPlayer->mDataSource.mLocator.mFD.fd, in android_audioPlayer_realize()
1603 (int64_t)pAudioPlayer->mDataSource.mLocator.mFD.length); in android_audioPlayer_realize()
1618 &pAudioPlayer->mAndroidBufferQueue, pAudioPlayer->mCallbackProtector); in android_audioPlayer_realize()
1619 pAudioPlayer->mAPlayer = splr; in android_audioPlayer_realize()
1620 splr->init(sfplayer_handlePrefetchEvent, (void*)pAudioPlayer); in android_audioPlayer_realize()
1628 pAudioPlayer->mAPlayer = decoder; in android_audioPlayer_realize()
1630 decoder->setDataPushListener(adecoder_writeToBufferQueue, pAudioPlayer); in android_audioPlayer_realize()
1632 decoder->init(sfplayer_handlePrefetchEvent, (void*)pAudioPlayer); in android_audioPlayer_realize()
1634 switch (pAudioPlayer->mDataSource.mLocator.mLocatorType) { in android_audioPlayer_realize()
1637 (const char*)pAudioPlayer->mDataSource.mLocator.mURI.URI); in android_audioPlayer_realize()
1640 int64_t offset = (int64_t)pAudioPlayer->mDataSource.mLocator.mFD.offset; in android_audioPlayer_realize()
1642 (int)pAudioPlayer->mDataSource.mLocator.mFD.fd, in android_audioPlayer_realize()
1645 (int64_t)pAudioPlayer->mDataSource.mLocator.mFD.length); in android_audioPlayer_realize()
1660 &pAudioPlayer->mAndroidBufferQueue); in android_audioPlayer_realize()
1662 bqtobq->setDataPushListener(adecoder_writeToBufferQueue, pAudioPlayer); in android_audioPlayer_realize()
1663 pAudioPlayer->mAPlayer = bqtobq; in android_audioPlayer_realize()
1666 pAudioPlayer->mAPlayer->init(sfplayer_handlePrefetchEvent, (void*)pAudioPlayer); in android_audioPlayer_realize()
1672 SL_LOGE(ERROR_PLAYERREALIZE_UNEXPECTED_OBJECT_TYPE_D, pAudioPlayer->mAndroidObjType); in android_audioPlayer_realize()
1680 if (memcmp(SL_IID_EQUALIZER, &pAudioPlayer->mEqualizer.mEqDescriptor.type, in android_audioPlayer_realize()
1682 SL_LOGV("Need to initialize EQ for AudioPlayer=%p", pAudioPlayer); in android_audioPlayer_realize()
1683 android_eq_init(pAudioPlayer->mSessionId, &pAudioPlayer->mEqualizer); in android_audioPlayer_realize()
1686 if (memcmp(SL_IID_BASSBOOST, &pAudioPlayer->mBassBoost.mBassBoostDescriptor.type, in android_audioPlayer_realize()
1688 SL_LOGV("Need to initialize BassBoost for AudioPlayer=%p", pAudioPlayer); in android_audioPlayer_realize()
1689 android_bb_init(pAudioPlayer->mSessionId, &pAudioPlayer->mBassBoost); in android_audioPlayer_realize()
1692 if (memcmp(SL_IID_VIRTUALIZER, &pAudioPlayer->mVirtualizer.mVirtualizerDescriptor.type, in android_audioPlayer_realize()
1694 SL_LOGV("Need to initialize Virtualizer for AudioPlayer=%p", pAudioPlayer); in android_audioPlayer_realize()
1695 android_virt_init(pAudioPlayer->mSessionId, &pAudioPlayer->mVirtualizer); in android_audioPlayer_realize()
1709 SLresult android_audioPlayer_preDestroy(CAudioPlayer *pAudioPlayer) { in android_audioPlayer_preDestroy() argument
1710 SL_LOGD("android_audioPlayer_preDestroy(%p)", pAudioPlayer); in android_audioPlayer_preDestroy()
1714 switch (pAudioPlayer->mAndroidObjType) { in android_audioPlayer_preDestroy()
1727 object_unlock_exclusive(&pAudioPlayer->mObject); in android_audioPlayer_preDestroy()
1728 if (pAudioPlayer->mCallbackProtector != 0) { in android_audioPlayer_preDestroy()
1729 pAudioPlayer->mCallbackProtector->requestCbExitAndWait(); in android_audioPlayer_preDestroy()
1731 object_lock_exclusive(&pAudioPlayer->mObject); in android_audioPlayer_preDestroy()
1734 if (pAudioPlayer->mAPlayer != 0) { in android_audioPlayer_preDestroy()
1735 pAudioPlayer->mAPlayer->preDestroy(); in android_audioPlayer_preDestroy()
1737 SL_LOGD("android_audioPlayer_preDestroy(%p) after mAPlayer->preDestroy()", pAudioPlayer); in android_audioPlayer_preDestroy()
1740 object_unlock_exclusive(&pAudioPlayer->mObject); in android_audioPlayer_preDestroy()
1741 if (pAudioPlayer->mCallbackProtector != 0) { in android_audioPlayer_preDestroy()
1742 pAudioPlayer->mCallbackProtector->requestCbExitAndWait(); in android_audioPlayer_preDestroy()
1744 object_lock_exclusive(&pAudioPlayer->mObject); in android_audioPlayer_preDestroy()
1752 SLresult android_audioPlayer_destroy(CAudioPlayer *pAudioPlayer) { in android_audioPlayer_destroy() argument
1754 SL_LOGV("android_audioPlayer_destroy(%p)", pAudioPlayer); in android_audioPlayer_destroy()
1755 switch (pAudioPlayer->mAndroidObjType) { in android_audioPlayer_destroy()
1759 if (pAudioPlayer->mAudioTrack != 0) { in android_audioPlayer_destroy()
1760 pAudioPlayer->mAudioTrack->stop(); in android_audioPlayer_destroy()
1762 pAudioPlayer->mAudioTrack.clear(); in android_audioPlayer_destroy()
1770 pAudioPlayer->mAPlayer.clear(); in android_audioPlayer_destroy()
1774 SL_LOGE(ERROR_PLAYERDESTROY_UNEXPECTED_OBJECT_TYPE_D, pAudioPlayer->mAndroidObjType); in android_audioPlayer_destroy()
1782 pAudioPlayer->mCallbackProtector.clear(); in android_audioPlayer_destroy()
1785 pAudioPlayer->mAudioTrack.~sp(); in android_audioPlayer_destroy()
1787 pAudioPlayer->mCallbackProtector.~sp(); in android_audioPlayer_destroy()
1788 pAudioPlayer->mAuxEffect.~sp(); in android_audioPlayer_destroy()
1789 pAudioPlayer->mAPlayer.~sp(); in android_audioPlayer_destroy()