[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] fix cancel message handling in pico.c
From: |
Andrei Kholodnyi |
Subject: |
[PATCH 3/3] fix cancel message handling in pico.c |
Date: |
Sat, 6 Nov 2010 23:27:08 +0100 |
when stop command was received, pico_state was set properly
to STATE_STOP but pico_process_tts was not interrupted
and has continued samples generation.
tested with spd_cancel_long_message
---
src/modules/pico.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/modules/pico.c b/src/modules/pico.c
index 0319414..5822b5d 100644
--- a/src/modules/pico.c
+++ b/src/modules/pico.c
@@ -221,9 +221,11 @@ static int pico_process_tts(void)
return -1;
}
}
- } while (PICO_STEP_BUSY == getstatus
- && g_atomic_int_get(&pico_state) == STATE_PLAY);
-
+ if (g_atomic_int_get(&pico_state) != STATE_PLAY) {
+ text_remaining = 0;
+ break;
+ }
+ } while (PICO_STEP_BUSY == getstatus);
}
g_free(picoInp);
--
1.6.0.4