aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-03 07:32:02 +0100
committerMax Kellermann <max@duempel.org>2008-11-03 07:32:02 +0100
commite6f334a08843c2673262326d22dd27921de6cbbe (patch)
treeb9a8b0e8164d3e2da6723e4ca4503540c1933840 /src/decoder
parentbb15c3bd4586fd58b82aa8006a2d658b88511a65 (diff)
downloadmpd-e6f334a08843c2673262326d22dd27921de6cbbe.tar.gz
mpd-e6f334a08843c2673262326d22dd27921de6cbbe.tar.xz
mpd-e6f334a08843c2673262326d22dd27921de6cbbe.zip
mod: removed boolean globals for lazy init
The variables mod_mikModInitiated and mod_mikModInitError were used to control lazy initialization, but they are superfluous now.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/mod_plugin.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/decoder/mod_plugin.c b/src/decoder/mod_plugin.c
index 3fb4c5610..5f3dbb191 100644
--- a/src/decoder/mod_plugin.c
+++ b/src/decoder/mod_plugin.c
@@ -92,25 +92,15 @@ static MDRIVER drv_mpd = {
VC_VoiceRealVolume
};
-static bool mod_mikModInitiated;
-static bool mod_mikModInitError;
-
static bool mod_initMikMod(void)
{
static char params[] = "";
- if (mod_mikModInitError)
- return false;
-
- if (!mod_mikModInitiated) {
- mod_mikModInitiated = true;
+ md_device = 0;
+ md_reverb = 0;
- md_device = 0;
- md_reverb = 0;
-
- MikMod_RegisterDriver(&drv_mpd);
- MikMod_RegisterAllLoaders();
- }
+ MikMod_RegisterDriver(&drv_mpd);
+ MikMod_RegisterAllLoaders();
md_pansep = 64;
md_mixfreq = 44100;
@@ -120,7 +110,6 @@ static bool mod_initMikMod(void)
if (MikMod_Init(params)) {
ERROR("Could not init MikMod: %s\n",
MikMod_strerror(MikMod_errno));
- mod_mikModInitError = true;
return false;
}