temp fix for dektop DSP build
This commit is contained in:
parent
0a53f7c0e6
commit
7578eba1ac
|
@ -664,7 +664,9 @@ target_compile_definitions(libtgvoip PRIVATE
|
||||||
DEFAULT_THREAD_PRIORITY)
|
DEFAULT_THREAD_PRIORITY)
|
||||||
|
|
||||||
target_compile_definitions(libtgvoip PUBLIC
|
target_compile_definitions(libtgvoip PUBLIC
|
||||||
TGVOIP_NO_DSP
|
# Chose one of NO_DSP / DESKTOP_DSP
|
||||||
|
# TGVOIP_NO_DSP
|
||||||
|
TGVOIP_USE_DESKTOP_DSP
|
||||||
TGVOIP_USE_SOFTWARE_AUDIO)
|
TGVOIP_USE_SOFTWARE_AUDIO)
|
||||||
|
|
||||||
if (${spdlog_FOUND})
|
if (${spdlog_FOUND})
|
||||||
|
|
|
@ -17,46 +17,48 @@
|
||||||
#include "modules/audio_processing/ns/defines.h"
|
#include "modules/audio_processing/ns/defines.h"
|
||||||
#include "modules/audio_processing/ns/ns_core.h"
|
#include "modules/audio_processing/ns/ns_core.h"
|
||||||
|
|
||||||
NsHandle* WebRtcNs_Create() {
|
// Further code is commented to fix static linking issue with PJSIP which already includes some WebRTC code
|
||||||
NoiseSuppressionC* self = malloc(sizeof(NoiseSuppressionC));
|
|
||||||
self->initFlag = 0;
|
|
||||||
return (NsHandle*)self;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebRtcNs_Free(NsHandle* NS_inst) {
|
//NsHandle* WebRtcNs_Create() {
|
||||||
free(NS_inst);
|
// NoiseSuppressionC* self = malloc(sizeof(NoiseSuppressionC));
|
||||||
}
|
// self->initFlag = 0;
|
||||||
|
// return (NsHandle*)self;
|
||||||
int WebRtcNs_Init(NsHandle* NS_inst, uint32_t fs) {
|
//}
|
||||||
return WebRtcNs_InitCore((NoiseSuppressionC*)NS_inst, fs);
|
//
|
||||||
}
|
//void WebRtcNs_Free(NsHandle* NS_inst) {
|
||||||
|
// free(NS_inst);
|
||||||
int WebRtcNs_set_policy(NsHandle* NS_inst, int mode) {
|
//}
|
||||||
return WebRtcNs_set_policy_core((NoiseSuppressionC*)NS_inst, mode);
|
//
|
||||||
}
|
//int WebRtcNs_Init(NsHandle* NS_inst, uint32_t fs) {
|
||||||
|
// return WebRtcNs_InitCore((NoiseSuppressionC*)NS_inst, fs);
|
||||||
void WebRtcNs_Analyze(NsHandle* NS_inst, const float* spframe) {
|
//}
|
||||||
WebRtcNs_AnalyzeCore((NoiseSuppressionC*)NS_inst, spframe);
|
//
|
||||||
}
|
//int WebRtcNs_set_policy(NsHandle* NS_inst, int mode) {
|
||||||
|
// return WebRtcNs_set_policy_core((NoiseSuppressionC*)NS_inst, mode);
|
||||||
void WebRtcNs_Process(NsHandle* NS_inst,
|
//}
|
||||||
const float* const* spframe,
|
//
|
||||||
size_t num_bands,
|
//void WebRtcNs_Analyze(NsHandle* NS_inst, const float* spframe) {
|
||||||
float* const* outframe) {
|
// WebRtcNs_AnalyzeCore((NoiseSuppressionC*)NS_inst, spframe);
|
||||||
WebRtcNs_ProcessCore((NoiseSuppressionC*)NS_inst, spframe, num_bands,
|
//}
|
||||||
outframe);
|
//
|
||||||
}
|
//void WebRtcNs_Process(NsHandle* NS_inst,
|
||||||
|
// const float* const* spframe,
|
||||||
float WebRtcNs_prior_speech_probability(NsHandle* handle) {
|
// size_t num_bands,
|
||||||
NoiseSuppressionC* self = (NoiseSuppressionC*)handle;
|
// float* const* outframe) {
|
||||||
if (handle == NULL) {
|
// WebRtcNs_ProcessCore((NoiseSuppressionC*)NS_inst, spframe, num_bands,
|
||||||
return -1;
|
// outframe);
|
||||||
}
|
//}
|
||||||
if (self->initFlag == 0) {
|
//
|
||||||
return -1;
|
//float WebRtcNs_prior_speech_probability(NsHandle* handle) {
|
||||||
}
|
// NoiseSuppressionC* self = (NoiseSuppressionC*)handle;
|
||||||
return self->priorSpeechProb;
|
// if (handle == NULL) {
|
||||||
}
|
// return -1;
|
||||||
|
// }
|
||||||
|
// if (self->initFlag == 0) {
|
||||||
|
// return -1;
|
||||||
|
// }
|
||||||
|
// return self->priorSpeechProb;
|
||||||
|
//}
|
||||||
|
|
||||||
const float* WebRtcNs_noise_estimate(const NsHandle* handle) {
|
const float* WebRtcNs_noise_estimate(const NsHandle* handle) {
|
||||||
const NoiseSuppressionC* self = (const NoiseSuppressionC*)handle;
|
const NoiseSuppressionC* self = (const NoiseSuppressionC*)handle;
|
||||||
|
|
Loading…
Reference in New Issue