Skip to content

Commit

Permalink
delete vad
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Jan 29, 2024
1 parent e574f61 commit 4e7760e
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 884 deletions.
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ SPEC CHECKSUMS:
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
TIoTLinkKit_XP2P: d9e422a3dbb19485e68206442e49f0e2c2fdb09d
TIoTLinkVideo: 421c45d7be6b34648da2527dbed693a9ce54317d
TIoTLinkVideo: 7a4a2388e7e3d4c226f627fb37d299f57b57655e
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d
Expand Down
10 changes: 1 addition & 9 deletions Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
#import "flv-muxer.h"

#include <iostream>
#include "wb_vad.h"
#import "TIoTPCMXEchoRecord.h"
#import <SoundTouchiOS/ijksoundtouch_wrap.h>
#import <GVoiceSEiOS/GVoiceSE.h>

__weak static TIoTAVCaptionFLV *tAVCaptionFLV = nil;
static flv_muxer_t* flvMuxer = nullptr;
dispatch_queue_t muxerQueue;
static VadVars *vadstate = nullptr;
//NSFileHandle *_fileHandle;

@interface TIoTAVCaptionFLV ()<AVCaptureVideoDataOutputSampleBufferDelegate,AVCaptureAudioDataOutputSampleBufferDelegate,H264EncoderDelegate,TIoTAACEncoderDelegate>
Expand All @@ -41,7 +39,6 @@ @interface TIoTAVCaptionFLV ()<AVCaptureVideoDataOutputSampleBufferDelegate,AVCa
@property (nonatomic, assign) int captureVideoFPS;
@property (nonatomic, strong) AVCaptureSessionPreset resolutionRatioValue;
@property (nonatomic, strong) TIoTPCMXEchoRecord *pcmRecord;
@property (nonatomic, assign) BOOL isVadRecongize;
//@property (nonatomic, strong) dispatch_queue_t audioEncodeQueue;
@end

Expand All @@ -54,7 +51,6 @@ -(instancetype) initWithAudioConfig:(TIoTAVCaptionFLVAudioType)audioSampleRate c
_audioRate = audioSampleRate;
_channel = channel;
_isEchoCancel = NO;
_isVadRecongize = NO;
_pitch = 0;
_devicePosition = AVCaptureDevicePositionBack;

Expand Down Expand Up @@ -87,7 +83,6 @@ - (void)setupAudioCapture {
self.aacEncoder.audioType = _audioRate;
return;
}
wb_vad_init(&(vadstate));
AudioStreamBasicDescription inAudioStreamBasicDescription;

self.pcmRecord = [[TIoTPCMXEchoRecord alloc] initWithChannel:_channel isEcho:_isEchoCancel];
Expand Down Expand Up @@ -376,7 +371,7 @@ - (void)setRemoteAudioFrame:(void *)pcmdata len:(int)pcmlen {
static uint8_t pcm_buffer_origin[640];
static uint8_t pcm_buffer_gvoice[640];
static uint8_t pcm_buffer_result[8192];
float indata[FRAME_LEN];

TPCircularBuffer circularBuf_gvoice_pcm;
TPCircularBuffer circularBuf_result_pcm;

Expand Down Expand Up @@ -570,7 +565,6 @@ -(BOOL) startCapture {
// [fileManager createFileAtPath:h264File contents:nil attributes:nil];
// _fileHandle = [NSFileHandle fileHandleForWritingAtPath:h264File];

self.isVadRecongize = NO;
[self.pcmRecord Init_buffer:&circularBuf_gvoice_pcm :1920];
[self.pcmRecord Init_buffer:&circularBuf_result_pcm :1920];
flv_init_load();
Expand All @@ -589,8 +583,6 @@ -(void) stopCapture{

[self.pcmRecord Destory_buffer:&circularBuf_gvoice_pcm];
[self.pcmRecord Destory_buffer:&circularBuf_result_pcm];
wb_vad_exit(&vadstate);
self.isVadRecongize = NO;
}

- (void) startCamera
Expand Down
18 changes: 0 additions & 18 deletions Source/SDK/LinkVideo/FLV/vad/typedef.h

This file was deleted.

Loading

0 comments on commit 4e7760e

Please sign in to comment.