yangjun
Committed by GitHub

Fix ctrl+c may lead to coredump (#2511)

... ... @@ -135,6 +135,7 @@ us_silver.json
kokoro-multi-lang-v1_0
sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16
cmake-build-debug
cmake-build-release
README-DEV.txt
*.rknn
*.jit
... ...
... ... @@ -165,6 +165,9 @@ int32_t main() {
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
if (!resampler.Get()) {
... ...
... ... @@ -172,6 +172,9 @@ int32_t main() {
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
if (!resampler.Get()) {
... ...
... ... @@ -172,6 +172,9 @@ as the device_name.
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
buffer.insert(buffer.end(), s.begin(), s.end());
... ...
... ... @@ -167,6 +167,10 @@ int32_t main() {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
if (!resampler.Get()) {
buffer.insert(buffer.end(), s.begin(), s.end());
... ...
... ... @@ -170,6 +170,9 @@ as the device_name.
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
buffer.insert(buffer.end(), s.begin(), s.end());
... ...
... ... @@ -164,6 +164,9 @@ int32_t main() {
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
if (!resampler.Get()) {
... ...
... ... @@ -172,6 +172,9 @@ int32_t main() {
while (samples_queue.empty() && !stop) {
condition_variable.wait(lock);
}
if (stop) {
break;
}
const auto &s = samples_queue.front();
if (!resampler.Get()) {
... ...