SUMMARY In the Memory activities (e.g., ‘Enumeration memory game’), when you flip a card, there is an annoying ~.5 second pause before the corresponding sound is played. STEPS TO REPRODUCE 1. Go to Enumeration memory game. 2. Flip a card containing a number. OBSERVED RESULT The card is flipped. Then there is a .5 second pause, and the word ‘number’ is spoken. EXPECTED RESULT The number should be spoken immediately after the card is finished flipping. Or even better, a fraction of a second *before*, since you can clearly see card front before the card is finished flipping. ADDITIONAL INFORMATION I *think* I know the reason for this. In src/activities/memory/CardItem.qml, there is an ‘interval: 1500’ timer (line 61), which must finish before the audio is played. But flipping the card takes less time. However, AFAICS, the long 1500 delay is intentional, to allow the player to take a good look at the card before it is flipped again (if it was the second card you flipped). And I don’t know how to fix it so that there’s still a 1500 delay, but that the sound is played right when the card is finished flipping (or a split second before).
Git commit d1828dde4eb8f8f6e30b659d9e3cdd3cb75fbde2 by Timothée Giet. Committed on 11/02/2022 at 13:15. Pushed by timotheegiet into branch 'master'. memory, play card audio as soon as it's turned without delay M +8 -5 src/activities/memory/CardItem.qml https://invent.kde.org/education/gcompris/commit/d1828dde4eb8f8f6e30b659d9e3cdd3cb75fbde2
I've fixed it to play the card audio as soon as the rotation is finished. I should probably not play earlier, as the card rotation takes 750ms, and there's the audio effect of the flipping card which takes around 500ms, so the current flow of audio feels good this way.
s/I should/It should/