aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-09-02 18:16:00 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-09-02 18:16:00 +0000
commit8810eafb82f5df4684af8ef94c8e98ef1677729f (patch)
tree66f750eb1124324fad117b31d9f46e1664461219 /src/inputPlugins
parentdf50ddf545c92692b108258f3e091533b26e3f94 (diff)
downloadmpd-8810eafb82f5df4684af8ef94c8e98ef1677729f.tar.gz
mpd-8810eafb82f5df4684af8ef94c8e98ef1677729f.tar.xz
mpd-8810eafb82f5df4684af8ef94c8e98ef1677729f.zip
add configuration variables for shout stuff
git-svn-id: https://svn.musicpd.org/mpd/trunk@2099 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/mod_plugin.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 0679d5e6d..766c38658 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -95,16 +95,21 @@ static int mod_mikModInitiated = 0;
static int mod_mikModInitError = 0;
static int mod_initMikMod() {
- if(mod_mikModInitiated) return 0;
if(mod_mikModInitError) return -1;
- mod_mikModInitiated = 1;
+ if(!mod_mikModInitiated) {
+ mod_mikModInitiated = 1;
- MikMod_RegisterDriver(&drv_mpd);
- MikMod_RegisterAllLoaders();
+ md_device = 0;
+ md_reverb = 0;
- md_reverb = 0;
- md_mode = (DMODE_SOFT_MUSIC | DMODE_SOFT_SNDFX | DMODE_STEREO |
+ MikMod_RegisterDriver(&drv_mpd);
+ MikMod_RegisterAllLoaders();
+ }
+
+ md_pansep = 64;
+ md_mixfreq = 44100;
+ md_mode = (DMODE_SOFT_MUSIC | DMODE_INTERP | DMODE_STEREO |
DMODE_16BITS);
if(MikMod_Init("")) {
@@ -130,7 +135,7 @@ static mod_Data * mod_open(char * path) {
MODULE * moduleHandle;
mod_Data * data;
- if(!(moduleHandle = Player_Load(path, 255, 0))) return NULL;
+ if(!(moduleHandle = Player_Load(path, 128, 0))) return NULL;
data = malloc(sizeof(mod_Data));
@@ -159,6 +164,7 @@ int mod_decode(OutputBuffer * cb, DecoderControl * dc, char * path) {
if(!(data = mod_open(path))) {
ERROR("failed to open mod: %s\n", path);
+ MikMod_Exit();
return -1;
}
@@ -192,6 +198,8 @@ int mod_decode(OutputBuffer * cb, DecoderControl * dc, char * path) {
mod_close(data);
+ MikMod_Exit();
+
if(dc->stop) {
dc->state = DECODE_STATE_STOP;
dc->stop = 0;
@@ -207,7 +215,7 @@ MpdTag * modTagDup(char * file) {
if(mod_initMikMod() < 0) return NULL;
- if(!(moduleHandle = Player_Load(file, 255, 0))) return NULL;
+ if(!(moduleHandle = Player_Load(file, 128, 0))) goto fail;
Player_Free(moduleHandle);
@@ -216,6 +224,9 @@ MpdTag * modTagDup(char * file) {
ret->time = 0;
ret->title = Player_LoadTitle(file);
+fail:
+ MikMod_Exit();
+
return ret;
}