Skip to content

Commit

Permalink
compile against audacious 3.5-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
CBke committed Oct 27, 2013
1 parent c35925d commit e81affc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
41 changes: 21 additions & 20 deletions src/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#include <dbus/dbus.h>

#include <audacious/audctrl.h>
#include <audacious/playlist.h>
#include <audacious/drct.h>

#include <audacious/dbus.h>


#include <SDL/SDL.h>
#include <SDL/SDL_thread.h>
/*#include <SDL/SDL_syswm.h>*/
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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 ();
Expand Down

0 comments on commit e81affc

Please sign in to comment.