Commit e39984d88aa2132ae7dd4802e5fb88f15d786579

Authored by 吴启风
1 parent 2ee6209a

feat:修复先声录音对音频会话的类别和模式设置影响了音频输出,导致单通道出声(听筒)

lib/pages/reading/bloc/reading_bloc.dart
... ... @@ -130,6 +130,7 @@ class ReadingPageBloc
130 130 "setMethodCallHandler method=${call.method} arguments=${call.arguments}");
131 131 if (call.method == 'voiceResult') {
132 132 //评测结果
  133 + await audioPlayer.setBalance(0.0);
133 134 add(XSVoiceResultEvent(call.arguments));
134 135 return;
135 136 }
... ... @@ -150,6 +151,7 @@ class ReadingPageBloc
150 151 print(call.method == 'voiceEnd' ? '评测结束' : '评测取消');
151 152 }
152 153 _isRecording = false;
  154 + await audioPlayer.setBalance(0.0);
153 155 add(OnXSVoiceStateChangeEvent());
154 156 return;
155 157 }
... ... @@ -157,6 +159,7 @@ class ReadingPageBloc
157 159 if (call.method == 'voiceFail') {
158 160 //评测失败
159 161 _isRecording = false;
  162 + await audioPlayer.setBalance(0.0);
160 163 EasyLoading.showToast('评测失败');
161 164 return;
162 165 }
... ...