From 859e4ba6f4709d045e4a53d53359af6c8c3a105d Mon Sep 17 00:00:00 2001 From: Xuhxx Date: Wed, 12 Apr 2023 22:04:37 +0800 Subject: [PATCH 1/2] [play.c]Fix function return value exception --- solutions/tflite_micro_speech_demo/player/player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/tflite_micro_speech_demo/player/player.c b/solutions/tflite_micro_speech_demo/player/player.c index 15837bca3b..b902627425 100644 --- a/solutions/tflite_micro_speech_demo/player/player.c +++ b/solutions/tflite_micro_speech_demo/player/player.c @@ -125,7 +125,7 @@ int32_t player_play(player_mp3_e file) return 0; } -int32_t player_stop(void) +void player_stop(void) { player_state_t state; @@ -137,7 +137,7 @@ int32_t player_stop(void) } -int32_t player_wait_complete(void) +void player_wait_complete(void) { int32_t ret; From 8210d4e6ae1b5b039f615438a18531cef69ff2fc Mon Sep 17 00:00:00 2001 From: Xuhxx Date: Mon, 17 Apr 2023 11:15:26 +0800 Subject: [PATCH 2/2] [play.c]Fix function return value exception v1.1 --- solutions/tflite_micro_speech_demo/player/player.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/solutions/tflite_micro_speech_demo/player/player.c b/solutions/tflite_micro_speech_demo/player/player.c index b902627425..085ec0ca95 100644 --- a/solutions/tflite_micro_speech_demo/player/player.c +++ b/solutions/tflite_micro_speech_demo/player/player.c @@ -125,7 +125,7 @@ int32_t player_play(player_mp3_e file) return 0; } -void player_stop(void) +int32_t player_stop(void) { player_state_t state; @@ -134,10 +134,11 @@ void player_stop(void) uvocplayer->stop_async(); uvocplayer->clr_source(); + return 0; } -void player_wait_complete(void) +int32_t player_wait_complete(void) { int32_t ret; @@ -145,8 +146,11 @@ void player_wait_complete(void) if (ret < 0) aos_msleep(1000); aos_msleep(500); + + return 0; } + int32_t player_init(player_cb_t cb) { int32_t ret;