From c35925d1cc2e92dacab39f9f32bf07e18c219a2a Mon Sep 17 00:00:00 2001 From: CBke Date: Sun, 27 Oct 2013 02:02:30 +0200 Subject: [PATCH 1/2] make autogen.sh executable --- autogen.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 autogen.sh diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 From e81affc4b854719f24e9fd767e19215458a1fa88 Mon Sep 17 00:00:00 2001 From: CBke Date: Sun, 27 Oct 2013 02:03:18 +0200 Subject: [PATCH 2/2] compile against audacious 3.5-devel --- src/effects.c | 4 ++-- src/main.c | 2 +- src/renderer.c | 41 +++++++++++++++++++++-------------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/effects.c b/src/effects.c index bd4e926..16ac523 100644 --- a/src/effects.c +++ b/src/effects.c @@ -18,7 +18,7 @@ void effects_save_effect (t_effect *effect) g_assert (effect); /** TODO Remove hardcoded path */ - f = fopen ("/usr/share/audacious/infinite_states","a"); + f = fopen ("/usr/local/share/audacious/infinite_states","a"); if (f == NULL) { g_warning (_("Could not be opened file %s for saving effects\n"), datafile); @@ -37,7 +37,7 @@ void effects_load_effects (void) gint32 finished = 0; gint32 i, b, c, d, e; - f = fopen ("/usr/share/audacious/infinite_states","r"); + f = fopen ("/usr/local/share/audacious/infinite_states","r"); if (f == NULL) { g_warning (_("Could not be opened file %s for loading effects\n"), datafile); diff --git a/src/main.c b/src/main.c index d9bc7c2..3535e7c 100644 --- a/src/main.c +++ b/src/main.c @@ -43,7 +43,7 @@ AUD_VIS_PLUGIN ( .take_message = NULL, .about = NULL, // TODO .configure = config_plugin_config_window, - .settings = NULL, // TODO + //.settings = NULL, // TODO //.playback_stop = NULL, /* reset internal state and clear display */ diff --git a/src/renderer.c b/src/renderer.c index eb6dea5..4553eb8 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -21,8 +21,12 @@ #include #include +#include +#include + #include + #include #include /*#include */ @@ -245,7 +249,7 @@ static gint disable_func (gpointer data) static void check_events () { SDL_Event event; - //gint volume; + gint volume; /*XEvent *xevent; XWindowChanges changes; @@ -254,10 +258,10 @@ static void check_events () if (config_get_show_title()) { if (g_timer_elapsed (title_timer, NULL) > 1.0) { - if (audacious_remote_is_playing (dbus_proxy)) { + if (aud_drct_get_playing () && aud_drct_get_ready ()) { if (current_title) g_free (current_title); - current_title = g_strdup (audacious_remote_get_playlist_title (dbus_proxy, audacious_remote_get_playlist_pos (dbus_proxy))); + current_title = g_strdup (aud_playlist_entry_get_title(aud_playlist_get_playing (), aud_playlist_get_position(aud_playlist_get_playing ()), FALSE)); set_title(); } else { @@ -316,43 +320,40 @@ static void check_events () case SDL_KEYDOWN: switch (event.key.keysym.sym) { case SDLK_RIGHT: - if (audacious_remote_is_playing (dbus_proxy)) - audacious_remote_jump_to_time (dbus_proxy, - audacious_remote_get_output_time (dbus_proxy) + 5000); + if (aud_drct_get_playing () && aud_drct_get_ready ()) + aud_drct_seek (aud_drct_get_time () + 5000); break; case SDLK_LEFT: - if (audacious_remote_is_playing (dbus_proxy)) - audacious_remote_jump_to_time (dbus_proxy, - audacious_remote_get_output_time (dbus_proxy) - 5000); + if (aud_drct_get_playing () && aud_drct_get_ready ()) + aud_drct_seek (aud_drct_get_time () - 5000); break; - /* FIXME Audacious freezes when buttons are pressed in a quick sequence case SDLK_UP: - volume = audacious_remote_get_main_volume (dbus_proxy); + aud_drct_get_volume_main(&volume); g_message(_("Increasing volume to %d"), volume + 5); - audacious_remote_set_main_volume (dbus_proxy, volume + 5); + aud_drct_set_volume_main(volume + 5); break; case SDLK_DOWN: - volume = audacious_remote_get_main_volume (dbus_proxy); + aud_drct_get_volume_main(&volume); g_message(_("Decreasing volume to %d"), volume - 5); - audacious_remote_set_main_volume (dbus_proxy, volume - 5); - break;*/ + aud_drct_set_volume_main(volume - 5); + break; case SDLK_TAB: display_toggle_fullscreen (); break; case SDLK_z: - audacious_remote_playlist_prev (dbus_proxy); + aud_drct_pl_prev(); break; case SDLK_x: - audacious_remote_play (dbus_proxy); + aud_drct_play(); break; case SDLK_c: - audacious_remote_pause (dbus_proxy); + aud_drct_pause(); break; case SDLK_v: - audacious_remote_stop (dbus_proxy); + aud_drct_stop(); break; case SDLK_b: - audacious_remote_playlist_next (dbus_proxy); + aud_drct_pl_next(); break; case SDLK_F11: display_save_screen ();