summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.c b/main.c
index 4aa9d88b..bde856ee 100644
--- a/main.c
+++ b/main.c
@@ -330,9 +330,18 @@ player_thread (uintptr_t ctx) {
while (messagepump_pop(&msg, &ctx, &p1, &p2) != -1) {
switch (msg) {
case M_REINIT_SOUND:
- palsa_free ();
- palsa_init ();
- palsa_play ();
+ {
+ int play = 0;
+ if (!palsa_ispaused () && !palsa_isstopped ()) {
+ play = 1;
+ }
+
+ palsa_free ();
+ palsa_init ();
+ if (play) {
+ palsa_play ();
+ }
+ }
break;
case M_TERMINATE:
GDK_THREADS_ENTER();