summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-09 19:33:49 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-09 19:33:49 +0100
commit5868217da60b338408122707911602078410f2f6 (patch)
treea909ba9aee9a7d52cea413caad661c992f49ff11 /plugins
parent489b51db96ec8a8cbcef5306ddd680e120ae12d6 (diff)
few minor bugfixes to adplug-2.2
Diffstat (limited to 'plugins')
-rw-r--r--plugins/adplug/adplug/a2m.cpp2
-rw-r--r--plugins/adplug/adplug/cmf.cpp12
-rw-r--r--plugins/adplug/adplug/fmopl.c12
-rw-r--r--plugins/adplug/adplug/msc.cpp2
-rw-r--r--plugins/adplug/adplug/u6m.cpp2
5 files changed, 17 insertions, 13 deletions
diff --git a/plugins/adplug/adplug/a2m.cpp b/plugins/adplug/adplug/a2m.cpp
index f506275d..d9d775e2 100644
--- a/plugins/adplug/adplug/a2m.cpp
+++ b/plugins/adplug/adplug/a2m.cpp
@@ -65,7 +65,7 @@ bool Ca2mLoader::load(const std::string &filename, const CFileProvider &fp)
char id[10];
int i,j,k,t;
unsigned int l;
- unsigned char *org, *orgptr, flags = 0, numpats, version;
+ unsigned char *org = 0, *orgptr, flags = 0, numpats, version;
unsigned long crc, alength;
unsigned short len[9], *secdata, *secptr;
const unsigned char convfx[16] = {0,1,2,23,24,3,5,4,6,9,17,13,11,19,7,14};
diff --git a/plugins/adplug/adplug/cmf.cpp b/plugins/adplug/adplug/cmf.cpp
index cd3d8006..580b6df3 100644
--- a/plugins/adplug/adplug/cmf.cpp
+++ b/plugins/adplug/adplug/cmf.cpp
@@ -281,14 +281,18 @@ bool CcmfPlayer::update()
break;
}
case 0xF1: // MIDI Time Code Quarter Frame
- this->data[this->iPlayPointer++]; // message data (ignored)
+ this->iPlayPointer++;
+ //this->data[this->iPlayPointer++]; // message data (ignored)
break;
case 0xF2: // Song position pointer
- this->data[this->iPlayPointer++]; // message data (ignored)
- this->data[this->iPlayPointer++];
+ this->iPlayPointer++;
+ this->iPlayPointer++;
+// this->data[this->iPlayPointer++]; // message data (ignored)
+// this->data[this->iPlayPointer++];
break;
case 0xF3: // Song select
- this->data[this->iPlayPointer++]; // message data (ignored)
+ this->iPlayPointer++;
+// this->data[this->iPlayPointer++]; // message data (ignored)
AdPlug_LogWrite("CMF: MIDI Song Select is not implemented.\n");
break;
case 0xF6: // Tune request
diff --git a/plugins/adplug/adplug/fmopl.c b/plugins/adplug/adplug/fmopl.c
index 2b0e82b0..66fc471e 100644
--- a/plugins/adplug/adplug/fmopl.c
+++ b/plugins/adplug/adplug/fmopl.c
@@ -322,7 +322,7 @@ INLINE void OPL_KEYOFF(OPL_SLOT *SLOT)
/* ---------- calcrate Envelope Generator & Phase Generator ---------- */
/* return : envelope output */
-INLINE UINT32 OPL_CALC_SLOT( OPL_SLOT *SLOT )
+static INLINE UINT32 OPL_CALC_SLOT( OPL_SLOT *SLOT )
{
/* calcrate envelope generator */
if( (SLOT->evc+=SLOT->evs) >= SLOT->eve )
@@ -388,7 +388,7 @@ INLINE void CALC_FCSLOT(OPL_CH *CH,OPL_SLOT *SLOT)
}
/* set multi,am,vib,EG-TYP,KSR,mul */
-INLINE void set_mul(FM_OPL *OPL,int slot,int v)
+static INLINE void set_mul(FM_OPL *OPL,int slot,int v)
{
OPL_CH *CH = &OPL->P_CH[slot/2];
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
@@ -418,7 +418,7 @@ INLINE void set_ksl_tl(FM_OPL *OPL,int slot,int v)
}
/* set attack rate & decay rate */
-INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
+static INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
{
OPL_CH *CH = &OPL->P_CH[slot/2];
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
@@ -435,7 +435,7 @@ INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
}
/* set sustain level & release rate */
-INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v)
+static INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v)
{
OPL_CH *CH = &OPL->P_CH[slot/2];
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
@@ -452,7 +452,7 @@ INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v)
/* operator output calcrator */
#define OP_OUT(slot,env,con) slot->wavetable[((slot->Cnt+con)/(0x1000000/SIN_ENT))&(SIN_ENT-1)][env]
/* ---------- calcrate one of channel ---------- */
-INLINE void OPL_CALC_CH( OPL_CH *CH )
+static INLINE void OPL_CALC_CH( OPL_CH *CH )
{
UINT32 env_out;
OPL_SLOT *SLOT;
@@ -497,7 +497,7 @@ INLINE void OPL_CALC_CH( OPL_CH *CH )
/* ---------- calcrate rythm block ---------- */
#define WHITE_NOISE_db 6.0
-INLINE void OPL_CALC_RH( OPL_CH *CH )
+static INLINE void OPL_CALC_RH( OPL_CH *CH )
{
UINT32 env_tam,env_sd,env_top,env_hh;
int whitenoise = (rand()&1)*(WHITE_NOISE_db/EG_STEP);
diff --git a/plugins/adplug/adplug/msc.cpp b/plugins/adplug/adplug/msc.cpp
index 2a10c5ce..c9eade06 100644
--- a/plugins/adplug/adplug/msc.cpp
+++ b/plugins/adplug/adplug/msc.cpp
@@ -211,7 +211,7 @@ bool CmscPlayer::decode_octet(u8 * output)
blk = msc_data [block_num];
while (1) {
u8 octet; // decoded octet
- u8 len_corr; // length correction
+ u8 len_corr = 0; // length correction
// advance to next block if necessary
if (block_pos >= blk.mb_length && dec_len == 0) {
diff --git a/plugins/adplug/adplug/u6m.cpp b/plugins/adplug/adplug/u6m.cpp
index 5c0a2ca2..d34f6fc2 100644
--- a/plugins/adplug/adplug/u6m.cpp
+++ b/plugins/adplug/adplug/u6m.cpp
@@ -215,7 +215,7 @@ bool Cu6mPlayer::lzw_decompress(Cu6mPlayer::data_block source, Cu6mPlayer::data_
long bytes_written = 0;
int cW;
- int pW;
+ int pW = 0;
unsigned char C;
while (!end_marker_reached)