diff src/audacious/dbus.c @ 4604:51d82bf6ba63

Use a define (AUD_EQUALIZER_NBANDS) instead of magic value 10 everywhere.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Jun 2008 22:27:06 +0300
parents c2d739b4c84d
children 9df19c4900ba
line wrap: on
line diff
--- a/src/audacious/dbus.c	Wed Jun 04 22:05:50 2008 +0300
+++ b/src/audacious/dbus.c	Wed Jun 04 22:27:06 2008 +0300
@@ -558,6 +558,7 @@
     return TRUE;
 }
 
+
 // Playback Information/Manipulation
 gboolean audacious_rc_play(RemoteObject *obj, GError **error) {
     if (playback_get_paused())
@@ -947,9 +948,9 @@
     int i;
 
     *preamp = (gdouble)equalizerwin_get_preamp();
-    *bands = g_array_sized_new(FALSE, FALSE, sizeof(gdouble), 10);
+    *bands = g_array_sized_new(FALSE, FALSE, sizeof(gdouble), AUD_EQUALIZER_NBANDS);
 
-    for(i=0; i<10; i++){
+    for(i=0; i < AUD_EQUALIZER_NBANDS; i++){
         gdouble val = (gdouble)equalizerwin_get_band(i);
         g_array_append_val(*bands, val);
     }
@@ -976,7 +977,7 @@
     
     equalizerwin_set_preamp((gfloat)preamp);
 
-    for (i = 0; i < 10; i++) {
+    for (i = 0; i < AUD_EQUALIZER_NBANDS; i++) {
         element = g_array_index(bands, gdouble, i);
         equalizerwin_set_band(i, (gfloat)element);
     }