Skip to content

Commit c95740c

Browse files
committed
录制16k杂音问题
Change-Id: Ida178ce495d8a97040d54ec8367a5a22f4b2373a
1 parent 4905f8e commit c95740c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ - (void)getDeviceStatusWithType:(NSString *)singleType qualityType:(NSString *)q
273273

274274
static int tt_pitch = 0;
275275
TIoTCoreAudioConfig *audio_config = [TIoTCoreAudioConfig new];
276-
audio_config.refreshSession = NO;
276+
audio_config.refreshSession = YES;
277277
audio_config.sampleRate = TIoTAVCaptionFLVAudio_8;
278278
audio_config.channels = 1;
279279
audio_config.isEchoCancel = YES;

Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ -(instancetype) initWithAudioConfig:(TIoTAVCaptionFLVAudioType)audioSampleRate c
5757
_pitch = 0;
5858
_devicePosition = AVCaptureDevicePositionBack;
5959

60-
_audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL);
60+
// _audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL);
6161
[self onInit];
6262
}
6363
return self;
@@ -405,7 +405,7 @@ static void record_callback(uint8_t *buffer, int size, void *u)
405405
*/
406406

407407
//pcm=>aac
408-
dispatch_async(vc.audioEncodeQueue, ^{
408+
// dispatch_async(vc.audioEncodeQueue, ^{
409409
static int tmpChannelDataLen = 2048;//vc.pcmRecord.pcmStreamDescription.mChannelsPerFrame * 2048;
410410
UInt32 aaclen = [vc.pcmRecord getData:&pcm_circularBuffer :trae_aac_buffer :tmpChannelDataLen];
411411
if (aaclen < tmpChannelDataLen) {
@@ -425,7 +425,7 @@ static void record_callback(uint8_t *buffer, int size, void *u)
425425
NSData *data = [NSData dataWithBytes:trae_aac_buffer length:tmpChannelDataLen];
426426
// [_fileHandle writeData:data];
427427
[vc.aacEncoder encodePCMData:data];
428-
});
428+
// });
429429
}
430430

431431

0 commit comments

Comments
 (0)