diff options
Diffstat (limited to '')
-rw-r--r-- | src/conf.c | 11 | ||||
-rw-r--r-- | src/conf.h | 7 | ||||
-rw-r--r-- | src/inputPlugins/mod_plugin.c | 27 |
3 files changed, 35 insertions, 10 deletions
diff --git a/src/conf.c b/src/conf.c index 473802200..7850c8881 100644 --- a/src/conf.c +++ b/src/conf.c @@ -37,7 +37,7 @@ #define CONF_COMMENT '#' -#define CONF_NUMBER_OF_PARAMS 34 +#define CONF_NUMBER_OF_PARAMS 41 #define CONF_NUMBER_OF_PATHS 6 #define CONF_NUMBER_OF_REQUIRED 5 #define CONF_NUMBER_OF_ALLOW_CATS 1 @@ -130,7 +130,14 @@ char ** readConf(char * file) { "http_proxy_port", "http_proxy_user", "http_proxy_password", - "replaygain_preamp" + "replaygain_preamp", + "shout_host", + "shout_port", + "shout_password", + "shout_mount", + "shout_name", + "shout_user", + "shout_quality" }; int conf_absolutePaths[CONF_NUMBER_OF_PATHS] = { diff --git a/src/conf.h b/src/conf.h index 6a06b0f0b..56ea0cc44 100644 --- a/src/conf.h +++ b/src/conf.h @@ -55,6 +55,13 @@ #define CONF_HTTP_PROXY_USER 31 #define CONF_HTTP_PROXY_PASSWORD 32 #define CONF_REPLAYGAIN_PREAMP 33 +#define CONF_SHOUT_HOST 34 +#define CONF_SHOUT_PORT 35 +#define CONF_SHOUT_PASSWD 36 +#define CONF_SHOUT_MOUNT 37 +#define CONF_SHOUT_NAME 38 +#define CONF_SHOUT_USER 39 +#define CONF_SHOUT_QUALITY 40 #define CONF_CAT_CHAR "\n" 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; } |