diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-20 11:00:49 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-20 11:00:49 +0200 |
commit | e02a90db751423453b45a5b06cf1e66d7a9c6708 (patch) | |
tree | c3c639916d4ce84671faf966d7c91c3255d2cdab /main.c | |
parent | 9916dec0d40c76452a21b44ea933b3dbf3ef966d (diff) |
suspend-to-ram check now handles paused state correctly
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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(); |