![]() ![]() eg (I have masked out my project folder) : View attachment 728497. 3) Type the unity editors location with -projectPath parameter. 2) Open 'cmd' (command prompt) in Administrator mode. Uint32_t availableOutputDevicesType = availableOutputDevices. If NOT, then do a fresh install of unity with android module and DO NOT OPEN UNITY. æ ¹æ®strategy为STRATEGY_PHONEï¼ä»¥ååå设置çmForceUse为AUDIO_POLICY_FORCE_SPEAKERï¼å¹é å°æ£ç¡®ç设å¤ç±»åï¼å好为AUDIO_DEVICE_OUT_SPEAKERï¼Äªudio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy,Ĭonst SwAudioOutputCollection &outputs) const If (mEngine->setForceUse(usage, config) != NO_ERROR) Ĭï¼checkOutputForStrategy æ ¹æ®çç¥ç±»ååå½å设置è·å设å¤ç±»åï¼å¹¶æinputåoutputè¿è¡å¤çï¼æåinvalidateStreamãĪudioPolicyManager::checkOutputForStrategy-audio_devices_tAudioPolicyManager::getDeviceForStrategy-mEngine->getDeviceForStrategyï¼ smaller than getMinBufferSize() will result in an initialization failure. Void AudioPolicyManager::setForceUse(audio_policy_force_use_t usage, int, ERRORBADVALUE, Denotes a failure due to the use of an invalid value. è¿æ ·ï¼å°±å°äºAudioç³»ç»äºï¼æ ¹æ®ä¹åçç« èï¼å°±ç¥éæ¥ä¸æ¥å°±æ¯AM/AService/ASystemäºï¼ÄªtSpeakerphoneOn/ binder IPC-setSpeakerphoneOn -/ mForcedUseForComm = AudioSystem.FORCE_SPEAKER / sendMsg(mAudioHandler,MSG_SET_FORCE_USE, SENDMSG_QUEUE,ĪudioSystem.FOR_COMMUNICATION, mForcedUseForComm, null, 0) /å é¨handler-setForceUse -setForceUseInt_SyncDevices - tForceUse/jni-AudioSystem::setForceUseĪudioSystem::setForceUse-AudioPolicyService::setForceUseï¼AudioPolicyInterfaceImpl.cppï¼-AudioPolicyManager::setForceUse complete code : final ToneGenerator tg new ToneGenerator (AudioManager.STREAMNOTIFICATION, 100) tg.startTone (ToneGenerator.TONEPROPBEEP) tg.release () Share. SetAudioRoute tAudioRoute(route)ndMessageWithSessionInfo / CallAudioRouteStateMachine.USER_SWITCH_SPEAKER/-éè¿ActiveSpeakerRouteåä¸.-setSpeakerphoneOn- tSpeakerphoneOn(on) it was just about releasing created objects of ToneGenerator because rapidly creating objects of 'ToneGenerator' without releasing them will cause the application to crash. tAudioRoute(CallAudioState.ROUTE_SPEAKER)/binderIPC- tAudioRoute(route) - tAudioRoute(route) - tAudioRoute(route) tAudioRoute(route) /binder IPC-â¦-CallsManager. E/ToneGenerator( 1837): ToneGenerator init failed W/camera ( 1837): Exception caught while creating tone generator: W/camera ( 1837): : Init failed W/camera ( 1837): at (Native Method) W/camera ( 1837): at .(ToneGenerator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |