[PATCH] executor: since tones are played async we can't play them in sync loop.
Dmitri Paduchikh
dpaduchikh на gmail.com
Пн Фев 25 19:05:36 MSK 2013
---
executors/default.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/executors/default.c b/executors/default.c
index ab7148f..4c45644 100644
--- a/executors/default.c
+++ b/executors/default.c
@@ -385,11 +385,6 @@ void execute(char* synthCommand, char* playerCommand, char* text)
void playNext()
{
- while(queueHead && queueHead->type == QUEUE_ITEM_TONE)
- {
- playTone(queueHead->freq, queueHead->duration);
- popQueueFront();
- }
if (queueHead == NULL)/*No more queue items to play*/
{
/*we must notify, there are no more items to play*/
@@ -397,7 +392,10 @@ void playNext()
fflush(stdout);
return;
}
- execute(queueHead->synthCommand, queueHead->playerCommand, queueHead->text);
+ if (queueHead->type == QUEUE_ITEM_TONE)
+ playTone(queueHead->freq, queueHead->duration);
+ else
+ execute(queueHead->synthCommand, queueHead->playerCommand, queueHead->text);
popQueueFront();
}
--
1.8.1.4
--=-=-=--
Подробная информация о списке рассылки Homeros