forked from xiaozhi/xiaozhi-esp32
fix nullptr error
This commit is contained in:
@@ -78,7 +78,9 @@ void AudioProcessor::Start() {
|
|||||||
|
|
||||||
void AudioProcessor::Stop() {
|
void AudioProcessor::Stop() {
|
||||||
xEventGroupClearBits(event_group_, PROCESSOR_RUNNING);
|
xEventGroupClearBits(event_group_, PROCESSOR_RUNNING);
|
||||||
afe_iface_->reset_buffer(afe_data_);
|
if (afe_data_ != nullptr) {
|
||||||
|
afe_iface_->reset_buffer(afe_data_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioProcessor::IsRunning() {
|
bool AudioProcessor::IsRunning() {
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ void WakeWordDetect::StartDetection() {
|
|||||||
|
|
||||||
void WakeWordDetect::StopDetection() {
|
void WakeWordDetect::StopDetection() {
|
||||||
xEventGroupClearBits(event_group_, DETECTION_RUNNING_EVENT);
|
xEventGroupClearBits(event_group_, DETECTION_RUNNING_EVENT);
|
||||||
afe_iface_->reset_buffer(afe_data_);
|
if (afe_data_ != nullptr) {
|
||||||
|
afe_iface_->reset_buffer(afe_data_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WakeWordDetect::IsDetectionRunning() {
|
bool WakeWordDetect::IsDetectionRunning() {
|
||||||
|
|||||||
Reference in New Issue
Block a user