changeset 2029:bce766d0c0ca trunk

[svn] - remove softvolume.c, only the alsa plugin uses it so we will move it there.
author nenolod
date Fri, 01 Dec 2006 23:18:07 -0800
parents 88bbe66923fe
children f158696b050d
files ChangeLog audacious/Makefile audacious/softvolume.c audacious/softvolume.h
diffstat 4 files changed, 8 insertions(+), 281 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 30 08:17:50 2006 -0800
+++ b/ChangeLog	Fri Dec 01 23:18:07 2006 -0800
@@ -1,3 +1,11 @@
+2006-11-30 16:17:50 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [3059]
+  - make wheel scroll trigger scan thread
+  
+  trunk/audacious/ui_playlist.c |    2 ++
+  1 file changed, 2 insertions(+)
+
+
 2006-11-30 12:27:49 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [3057]
   - clean up
--- a/audacious/Makefile	Thu Nov 30 08:17:50 2006 -0800
+++ b/audacious/Makefile	Fri Dec 01 23:18:07 2006 -0800
@@ -64,7 +64,6 @@
 	glade.c \
 	hints.c \
 	about.c credits.c \
-	softvolume.c \
 	getopt.c getopt1.c \
 	urldecode.c \
 	iir.c \
--- a/audacious/softvolume.c	Thu Nov 30 08:17:50 2006 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*  XMMS - Software volume managment.
- *  Copyright (C) 2001-2003 Matthieu Sozeau
- *  Original implementation from a patch by Tomas Simonaitis <haden@homelan.lt>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include <libaudacious/configdb.h>
-#include "softvolume.h"
-
-
-/**************************************************************************
- *
- *  soft_volume_load
- *
- *  TODO: make argument order consistent with soft_volume_save()
- *
- **************************************************************************/
-
-void
-soft_volume_load(const gchar * section, SoftVolumeConfig * c)
-{
-    ConfigDb *db;
-
-    g_return_if_fail(c != NULL);
-
-    c->enabled = FALSE;
-    c->volume_left = 0;
-    c->volume_right = 0;
-
-    db = bmp_cfg_db_open();
-
-    bmp_cfg_db_get_bool(db, section, "softvolume_enable", &c->enabled);
-    bmp_cfg_db_get_int(db, section, "softvolume_left", &c->volume_left);
-    bmp_cfg_db_get_int(db, section, "softvolume_right", &c->volume_right);
-
-    bmp_cfg_db_close(db);
-}
-
-
-/**************************************************************************
- *
- *  soft_volume_save
- *
- *  TODO: make argument order consistent with soft_volume_load()
- *
- **************************************************************************/
-
-void
-soft_volume_save(SoftVolumeConfig * c, const gchar * section)
-{
-    ConfigDb *db;
-
-    g_return_if_fail(c != NULL);
-
-    db = bmp_cfg_db_open();
-
-    bmp_cfg_db_set_bool(db, section, "softvolume_enable", c->enabled);
-    bmp_cfg_db_set_int(db, section, "softvolume_left", c->volume_left);
-    bmp_cfg_db_set_int(db, section, "softvolume_right", c->volume_right);
-
-    bmp_cfg_db_close(db);
-}
-
-
-
-/**************************************************************************
- *
- *  soft_volume_get
- *
- **************************************************************************/
-
-void
-soft_volume_get(SoftVolumeConfig * c, gint * l, gint * r)
-{
-    if (c == NULL)
-        return;
-
-    *l = c->volume_left;
-    *r = c->volume_right;
-}
-
-
-
-/**************************************************************************
- *
- * soft_volume_set
- *
- **************************************************************************/
-
-void
-soft_volume_set(SoftVolumeConfig * c, gint l, gint r)
-{
-    if (c == NULL)
-        return;
-
-    c->volume_left = l;
-    c->volume_right = r;
-}
-
-
-/**************************************************************************
- *
- *  effect_16bit
- *
- **************************************************************************/
-
-void
-effect_16bit(gint max, gint min, guint length, gint16 * sdata,
-             SoftVolumeConfig * c)
-{
-    guint i;
-    gint v;
-
-    for (i = 0; i < (length >> 2); ++i) {   /* ie. length/4 */
-        v = (gint) ((*sdata * c->volume_left) / 100);
-        *(sdata++) = (gint16) CLAMP(v, min, max);
-
-        v = (gint) ((*sdata * c->volume_right) / 100);
-        *(sdata++) = (gint16) CLAMP(v, min, max);
-    }
-}
-
-
-/**************************************************************************
- *
- *  effect_8bit
- *
- **************************************************************************/
-
-void
-effect_8bit(gint max, gint min, guint length, gint8 * sdata,
-            SoftVolumeConfig * c)
-{
-    guint i;
-    gint v;
-
-    for (i = 0; i < (length >> 1); ++i) {   /* ie. length/2 */
-        v = (gint) ((*sdata * c->volume_left) / 100);
-        *(sdata++) = (gint8) CLAMP(v, min, max);
-
-        v = (gint) ((*sdata * c->volume_right) / 100);
-        *(sdata++) = (gint8) CLAMP(v, min, max);
-    }
-}
-
-
-/**************************************************************************
- *
- *  soft_volume_effect
- *
- **************************************************************************/
-
-void
-soft_volume_effect(SoftVolumeConfig * c, gpointer data, AFormat format,
-                   gint length)
-{
-    if (!c)
-        return;
-
-    if (c->volume_right == -1)
-        c->volume_right = c->volume_left;
-
-    switch (format) {
-#if (G_BYTE_ORDER == G_BIG_ENDIAN)
-    case FMT_S16_LE:
-    case FMT_U16_LE:
-        break;
-
-    case FMT_U16_NE:
-    case FMT_U16_BE:
-        effect_16bit(65535, 0, length, data, c);
-        break;
-
-    case FMT_S16_BE:
-    case FMT_S16_NE:
-        effect_16bit(32767, -32768, length, data, c);
-        break;
-#else
-    case FMT_S16_BE:
-    case FMT_U16_BE:
-        break;
-
-    case FMT_U16_LE:
-    case FMT_U16_NE:
-        effect_16bit(65535, 0, length, data, c);
-        break;
-
-    case FMT_S16_LE:
-    case FMT_S16_NE:
-        effect_16bit(32767, -32768, length, data, c);
-        break;
-#endif
-
-    case FMT_U8:
-        effect_8bit(255, 0, length, data, c);
-        break;
-
-    case FMT_S8:
-        effect_8bit(127, -128, length, data, c);
-        break;
-    }
-}
--- a/audacious/softvolume.h	Thu Nov 30 08:17:50 2006 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*  XMMS - Software volume managment.
- *  Copyright (C) 2001-2003 Matthieu Sozeau
- *  Original implementation from a patch by Tomas Simonaitis <haden@homelan.lt>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef SOFTVOLUME_H
-#define SOFTVOLUME_H
-
-#include "plugin.h"             /* glib and AFomat definition */
-
-struct _SoftVolumeConfig {
-    gboolean enabled;
-    gint volume_left;
-    gint volume_right;
-};
-
-typedef struct _SoftVolumeConfig SoftVolumeConfig;
-
-/**************************************************************************
- *
- *   Functions to read/write a particular soft volume configuration.
- *   If section is NULL, the global ("xmms") section is used.
- *
- **************************************************************************/
-
-void soft_volume_load(const gchar * section, SoftVolumeConfig * c);
-
-void soft_volume_save(SoftVolumeConfig * c, const gchar * section);
-
-
-/**************************************************************************
- *
- *   Functions to set the volume and get the current volume
- *
- **************************************************************************/
-
-void soft_volume_set(SoftVolumeConfig * c, gint l, gint r);
-
-void soft_volume_get(SoftVolumeConfig * c, gint * l, gint * r);
-
-
-/**************************************************************************
- *
- *   Modify the buffer according to volume settings
- *
- **************************************************************************/
-
-void soft_volume_effect(SoftVolumeConfig * c,
-                        gpointer data, AFormat format, gint length);
-
-#endif