Sync from bytedesk-private: update

This commit is contained in:
jack ning
2024-12-14 10:43:18 +08:00
parent 476eebb101
commit 5e082909e4
3421 changed files with 812709 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
* Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights
* Reserved. MIT License (https://opensource.org/licenses/MIT)
*/
#include "microphone.h"
#include <stdio.h>
#include <stdlib.h>
#include "portaudio.h" // NOLINT
Microphone::Microphone() {
PaError err = Pa_Initialize();
if (err != paNoError) {
LOG(ERROR)<<"portaudio error: " << Pa_GetErrorText(err);
exit(-1);
}
}
Microphone::~Microphone() {
PaError err = Pa_Terminate();
if (err != paNoError) {
LOG(ERROR)<<"portaudio error: " << Pa_GetErrorText(err);
exit(-1);
}
}