From c95740c4231ec82e5d12b8d3579456cf0a2d3e08 Mon Sep 17 00:00:00 2001 From: tonychan Date: Fri, 3 Nov 2023 11:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E5=88=B616k=E6=9D=82=E9=9F=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ida178ce495d8a97040d54ec8367a5a22f4b2373a --- .../LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m | 2 +- Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m b/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m index ac04ee41..1646d4a8 100644 --- a/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m +++ b/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m @@ -273,7 +273,7 @@ - (void)getDeviceStatusWithType:(NSString *)singleType qualityType:(NSString *)q static int tt_pitch = 0; TIoTCoreAudioConfig *audio_config = [TIoTCoreAudioConfig new]; - audio_config.refreshSession = NO; + audio_config.refreshSession = YES; audio_config.sampleRate = TIoTAVCaptionFLVAudio_8; audio_config.channels = 1; audio_config.isEchoCancel = YES; diff --git a/Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm b/Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm index 61ac3a7d..587fe61c 100755 --- a/Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm +++ b/Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm @@ -57,7 +57,7 @@ -(instancetype) initWithAudioConfig:(TIoTAVCaptionFLVAudioType)audioSampleRate c _pitch = 0; _devicePosition = AVCaptureDevicePositionBack; - _audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL); +// _audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL); [self onInit]; } return self; @@ -405,7 +405,7 @@ static void record_callback(uint8_t *buffer, int size, void *u) */ //pcm=>aac - dispatch_async(vc.audioEncodeQueue, ^{ +// dispatch_async(vc.audioEncodeQueue, ^{ static int tmpChannelDataLen = 2048;//vc.pcmRecord.pcmStreamDescription.mChannelsPerFrame * 2048; UInt32 aaclen = [vc.pcmRecord getData:&pcm_circularBuffer :trae_aac_buffer :tmpChannelDataLen]; if (aaclen < tmpChannelDataLen) { @@ -425,7 +425,7 @@ static void record_callback(uint8_t *buffer, int size, void *u) NSData *data = [NSData dataWithBytes:trae_aac_buffer length:tmpChannelDataLen]; // [_fileHandle writeData:data]; [vc.aacEncoder encodePCMData:data]; - }); +// }); }