changeset 2119:5fea114ca11e

Use a #define for config ID.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 23 Oct 2007 08:45:14 +0300
parents c34348f00f95
children 447da61804f1
files src/modplug/modplugbmp.cxx src/modplug/modplugbmp.h src/musepack/libmpc.cxx
diffstat 3 files changed, 47 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/src/modplug/modplugbmp.cxx	Tue Oct 23 08:43:34 2007 +0300
+++ b/src/modplug/modplugbmp.cxx	Tue Oct 23 08:45:14 2007 +0300
@@ -78,28 +78,28 @@
 	
 	db = aud_cfg_db_open();
 
-	aud_cfg_db_get_bool(db,"modplug","Surround", &mModProps.mSurround);
-        aud_cfg_db_get_bool(db,"modplug","Oversampling", &mModProps.mOversamp);
-        aud_cfg_db_get_bool(db,"modplug","Megabass", &mModProps.mMegabass);
-        aud_cfg_db_get_bool(db,"modplug","NoiseReduction", &mModProps.mNoiseReduction);
-        aud_cfg_db_get_bool(db,"modplug","VolumeRamp", &mModProps.mVolumeRamp);
-        aud_cfg_db_get_bool(db,"modplug","Reverb", &mModProps.mReverb);
-        aud_cfg_db_get_bool(db,"modplug","FastInfo", &mModProps.mFastinfo);
-        aud_cfg_db_get_bool(db,"modplug","UseFileName", &mModProps.mUseFilename);
-        aud_cfg_db_get_bool(db,"modplug","GrabAmigaMOD", &mModProps.mGrabAmigaMOD);
-        aud_cfg_db_get_bool(db,"modplug","PreAmp", &mModProps.mPreamp);
-        aud_cfg_db_get_float(db,"modplug","PreAmpLevel", &mModProps.mPreampLevel);
-        aud_cfg_db_get_int(db,"modplug", "Channels", &mModProps.mChannels);
-        aud_cfg_db_get_int(db,"modplug", "Bits", &mModProps.mBits);
-        aud_cfg_db_get_int(db,"modplug", "Frequency", &mModProps.mFrequency);
-        aud_cfg_db_get_int(db,"modplug", "ResamplineMode", &mModProps.mResamplingMode);
-        aud_cfg_db_get_int(db,"modplug", "ReverbDepth", &mModProps.mReverbDepth);
-        aud_cfg_db_get_int(db,"modplug", "ReverbDelay", &mModProps.mReverbDelay);
-        aud_cfg_db_get_int(db,"modplug", "BassAmount", &mModProps.mBassAmount);
-        aud_cfg_db_get_int(db,"modplug", "BassRange", &mModProps.mBassRange);
-        aud_cfg_db_get_int(db,"modplug", "SurroundDepth", &mModProps.mSurroundDepth);
-        aud_cfg_db_get_int(db,"modplug", "SurroundDelay", &mModProps.mSurroundDelay);
-        aud_cfg_db_get_int(db,"modplug", "LoopCount", &mModProps.mLoopCount);
+	aud_cfg_db_get_bool(db, MODPLUG_CFGID,"Surround", &mModProps.mSurround);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"Oversampling", &mModProps.mOversamp);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"Megabass", &mModProps.mMegabass);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"NoiseReduction", &mModProps.mNoiseReduction);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"VolumeRamp", &mModProps.mVolumeRamp);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"Reverb", &mModProps.mReverb);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"FastInfo", &mModProps.mFastinfo);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"UseFileName", &mModProps.mUseFilename);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"GrabAmigaMOD", &mModProps.mGrabAmigaMOD);
+        aud_cfg_db_get_bool(db, MODPLUG_CFGID,"PreAmp", &mModProps.mPreamp);
+        aud_cfg_db_get_float(db, MODPLUG_CFGID,"PreAmpLevel", &mModProps.mPreampLevel);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "Channels", &mModProps.mChannels);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "Bits", &mModProps.mBits);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "Frequency", &mModProps.mFrequency);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "ResamplineMode", &mModProps.mResamplingMode);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "ReverbDepth", &mModProps.mReverbDepth);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "ReverbDelay", &mModProps.mReverbDelay);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "BassAmount", &mModProps.mBassAmount);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "BassRange", &mModProps.mBassRange);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "SurroundDepth", &mModProps.mSurroundDepth);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "SurroundDelay", &mModProps.mSurroundDelay);
+        aud_cfg_db_get_int(db, MODPLUG_CFGID, "LoopCount", &mModProps.mLoopCount);
 
 	aud_cfg_db_close(db);
 }
@@ -639,28 +639,28 @@
 
 	db = aud_cfg_db_open();
 
-	aud_cfg_db_set_bool(db,"modplug","Surround", mModProps.mSurround);
-        aud_cfg_db_set_bool(db,"modplug","Oversampling", mModProps.mOversamp);
-        aud_cfg_db_set_bool(db,"modplug","Megabass", mModProps.mMegabass);
-        aud_cfg_db_set_bool(db,"modplug","NoiseReduction", mModProps.mNoiseReduction);
-        aud_cfg_db_set_bool(db,"modplug","VolumeRamp", mModProps.mVolumeRamp);
-        aud_cfg_db_set_bool(db,"modplug","Reverb", mModProps.mReverb);
-        aud_cfg_db_set_bool(db,"modplug","FastInfo", mModProps.mFastinfo);
-        aud_cfg_db_set_bool(db,"modplug","UseFileName", mModProps.mUseFilename);
-        aud_cfg_db_set_bool(db,"modplug","GrabAmigaMOD", mModProps.mGrabAmigaMOD);
-        aud_cfg_db_set_bool(db,"modplug","PreAmp", mModProps.mPreamp);
-        aud_cfg_db_set_float(db,"modplug","PreAmpLevel", mModProps.mPreampLevel);
-        aud_cfg_db_set_int(db,"modplug", "Channels", mModProps.mChannels);
-        aud_cfg_db_set_int(db,"modplug", "Bits", mModProps.mBits);
-        aud_cfg_db_set_int(db,"modplug", "Frequency", mModProps.mFrequency);
-        aud_cfg_db_set_int(db,"modplug", "ResamplineMode", mModProps.mResamplingMode);
-        aud_cfg_db_set_int(db,"modplug", "ReverbDepth", mModProps.mReverbDepth);
-        aud_cfg_db_set_int(db,"modplug", "ReverbDelay", mModProps.mReverbDelay);
-        aud_cfg_db_set_int(db,"modplug", "BassAmount", mModProps.mBassAmount);
-        aud_cfg_db_set_int(db,"modplug", "BassRange", mModProps.mBassRange);
-        aud_cfg_db_set_int(db,"modplug", "SurroundDepth", mModProps.mSurroundDepth);
-        aud_cfg_db_set_int(db,"modplug", "SurroundDelay", mModProps.mSurroundDelay);
-        aud_cfg_db_set_int(db,"modplug", "LoopCount", mModProps.mLoopCount);
+	aud_cfg_db_set_bool(db, MODPLUG_CFGID,"Surround", mModProps.mSurround);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"Oversampling", mModProps.mOversamp);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"Megabass", mModProps.mMegabass);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"NoiseReduction", mModProps.mNoiseReduction);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"VolumeRamp", mModProps.mVolumeRamp);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"Reverb", mModProps.mReverb);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"FastInfo", mModProps.mFastinfo);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"UseFileName", mModProps.mUseFilename);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"GrabAmigaMOD", mModProps.mGrabAmigaMOD);
+        aud_cfg_db_set_bool(db, MODPLUG_CFGID,"PreAmp", mModProps.mPreamp);
+        aud_cfg_db_set_float(db, MODPLUG_CFGID,"PreAmpLevel", mModProps.mPreampLevel);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "Channels", mModProps.mChannels);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "Bits", mModProps.mBits);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "Frequency", mModProps.mFrequency);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "ResamplineMode", mModProps.mResamplingMode);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "ReverbDepth", mModProps.mReverbDepth);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "ReverbDelay", mModProps.mReverbDelay);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "BassAmount", mModProps.mBassAmount);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "BassRange", mModProps.mBassRange);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "SurroundDepth", mModProps.mSurroundDepth);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "SurroundDelay", mModProps.mSurroundDelay);
+        aud_cfg_db_set_int(db, MODPLUG_CFGID, "LoopCount", mModProps.mLoopCount);
 
 	aud_cfg_db_close(db);
 }
--- a/src/modplug/modplugbmp.h	Tue Oct 23 08:43:34 2007 +0300
+++ b/src/modplug/modplugbmp.h	Tue Oct 23 08:45:14 2007 +0300
@@ -18,6 +18,8 @@
 #include <audacious/plugin.h>
 }
 
+#define MODPLUG_CFGID	"modplug"
+
 /* Module files have their magic deep inside the file, at offset 1080; source: http://www.onicos.com/staff/iz/formats/mod.html and information by Michael Doering from UADE */
 #define MOD_MAGIC_PROTRACKER4	(unsigned char [4]) { 0x4D, 0x2E, 0x4B, 0x2E }  // "M.K." - Protracker 4 channel
 #define MOD_MAGIC_PROTRACKER4X	(unsigned char [4]) { 0x4D, 0x21, 0x4B, 0x21 }  // "M!K!" - Protracker 4 channel
--- a/src/musepack/libmpc.cxx	Tue Oct 23 08:43:34 2007 +0300
+++ b/src/musepack/libmpc.cxx	Tue Oct 23 08:45:14 2007 +0300
@@ -773,7 +773,7 @@
 static void* decodeStream(InputPlayback *data)
 {
     lockAcquire();
-    char* filename = data->filename;
+    gchar* filename = data->filename;
     VFSFile *input = aud_vfs_fopen(filename, "rb");
     if (!input)
     {