diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-11 21:40:13 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-11 21:40:50 +0100 |
commit | b5196b51f6858347bc1af2e243cbc1cd742110ee (patch) | |
tree | 7d8728acd1c8d5fb178269636d3abd2bd205a080 /main.c | |
parent | 3dfee5bd02b3f264f3ccdf7513c5078b2806196c (diff) |
alsa code converted into output plugin
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -235,15 +235,13 @@ player_thread (uintptr_t ctx) { switch (msg) { case M_REINIT_SOUND: { - int play = 0; - if (!palsa_ispaused () && !palsa_isstopped ()) { - play = 1; - } - - palsa_free (); - palsa_init (); - if (play) { - palsa_play (); + int state = p_get_state (); + + p_free (); + p_init (); + + if (state != OUTPUT_STATE_PAUSED && state != OUTPUT_STATE_STOPPED) { + p_play (); } } break; @@ -274,7 +272,7 @@ player_thread (uintptr_t ctx) { pl_prevsong (); break; case M_PAUSESONG: - if (p_ispaused ()) { + if (p_get_state () == OUTPUT_STATE_PAUSED) { p_unpause (); plug_trigger_event_paused (0); } @@ -291,7 +289,7 @@ player_thread (uintptr_t ctx) { plug_trigger_event_playlistchanged (); break; case M_CONFIGCHANGED: - palsa_configchanged (); + //plug_get_output ()->configchanged (); streamer_configchanged (); plug_trigger_event (DB_EV_CONFIGCHANGED, 0); break; |