当前位置:网站首页>TRTC setaudioroute invalid problem

TRTC setaudioroute invalid problem

2022-06-23 03:34:00 Sumn

TRTC During audio and video communication between both parties , The one who doesn't open the wheat , adopt setAudioRoute Setting whether the sound is played out has no effect reason : When we don't open the wheat, we go through the media channel , Unable to set sound playback setAudioRoute. analysis : [I][2020-09-15 +8.0 18:21:45.097][28356, 30490][][audio_device_android.cpp, OnPlayAudioData, 1533][AudioEngine : AudioDeviceAndroid play device ready:sample_rate:48000 channels:2 bits:16, volumetype:MEDIA_PLAY: Indicates that the media channel is being used , There is no way to set whether to put it out Only when volumetype Not for MEDIA_PLAY, by volumetype:VOIP To set the external amplifier or the earpiece normally . 

TRTC The host sets the audio quality setAudioQuality After high sound quality , setAudioRoute Unable to switch .

reason : Set to high quality ,sdk Will switch the audio channel to media , The media channel cannot cut the route , It needs to be enforced in startLocalAudio Before calling setSystemVolumeType, Set as call .

Android in

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> Missing speakers will also result in failure to switch speakers

原网站

版权声明
本文为[Sumn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/01/202201181219159459.html