trtc音质优化
This commit is contained in:
@@ -103,7 +103,11 @@
|
|||||||
- (void)broadcast:(BOOL)on {
|
- (void)broadcast:(BOOL)on {
|
||||||
[self.engine switchRole:on ? TRTCRoleAnchor : TRTCRoleAudience];
|
[self.engine switchRole:on ? TRTCRoleAnchor : TRTCRoleAudience];
|
||||||
if (on) {
|
if (on) {
|
||||||
[self.engine startLocalAudio:TRTCAudioQualityDefault];
|
NSString *jsonString = @"{\"api\":\"setAudioQualityEx\",\"params\":{\"sampleRate\":48000,\"channel\":2,\"bitrate\":192,\"encodeMode\":1,\"systemVolumeType\":1}}";
|
||||||
|
[self.engine callExperimentalAPI:jsonString];
|
||||||
|
NSString *aecString = @"{\"api\":\"enableAudioAEC\",\"params\":{\"enable\":1,\"level\":100}}";
|
||||||
|
[self.engine callExperimentalAPI:aecString];
|
||||||
|
[self.engine startLocalAudio:TRTCAudioQualityMusic];
|
||||||
} else {
|
} else {
|
||||||
[self.engine stopLocalAudio];
|
[self.engine stopLocalAudio];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user