diff src/audacious/input.c @ 2505:87c53f0e9e0d trunk

[svn] - added set volume hook
author giacomo
date Mon, 12 Feb 2007 07:18:47 -0800
parents f2b3d6428b67
children c8d6564f9c82
line wrap: on
line diff
--- a/src/audacious/input.c	Mon Feb 12 04:34:56 2007 -0800
+++ b/src/audacious/input.c	Mon Feb 12 07:18:47 2007 -0800
@@ -42,6 +42,7 @@
 #include "util.h"
 #include "visualization.h"
 #include "widgets/widgetcore.h"
+#include "hook.h"
 
 #include "vfs.h"
 #include "vfs_buffer.h"
@@ -748,6 +749,8 @@
 void
 input_set_volume(gint l, gint r)
 {
+    gint h_vol[2];
+    
     if (playback_get_playing()) {
         if (get_current_input_playback() &&
             get_current_input_playback()->plugin->set_volume &&
@@ -756,6 +759,10 @@
         }
     }
     output_set_volume(l, r);
+    
+    h_vol[0] = l;
+    h_vol[1] = r;
+    hook_call("volume set", h_vol);
 }
 
 void