[BugFix]修复声音签名bug

This commit is contained in:
wushaocheng
2023-01-17 15:57:49 +08:00
parent 45acfa5d5a
commit fd3dd3cdb1
2 changed files with 4 additions and 2 deletions

View File

@@ -124,6 +124,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
if(AvRoomDataManager.get().isOwnerOnMic) {
toast(getString(R.string.on_the_mic_not_record))
} else {
soundViewModel.stopRoomSound()
soundViewModel.showRecordingState()
}
}

View File

@@ -221,6 +221,7 @@ class SoundViewModel : BaseViewModel() {
*/
fun stopRecord() {
audioManager?.stopRecord(false)
openRoomSound()
_stopChronometerLiveData.value = null
}
@@ -334,7 +335,7 @@ class SoundViewModel : BaseViewModel() {
_refreshPlayStatusLiveData.value = true// 点击试听按钮此时并没有正在播放声音,则播放声音并显示正在播放状态(暂停按钮)
}
private fun stopRoomSound() {
fun stopRoomSound() {
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
AudioEngineManager.get().isRemoteMute = true //設置靜音
AudioEngineManager.get().isMute = true //不能説話
@@ -342,7 +343,7 @@ class SoundViewModel : BaseViewModel() {
}
}
private fun openRoomSound() {
fun openRoomSound() {
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
AudioEngineManager.get().isRemoteMute = isRemoteMute //非靜音
AudioEngineManager.get().isMute = isMute //能説話