Skip to content

Commit

Permalink
libmodplug: silence annoying watcom warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Mar 19, 2021
1 parent df89201 commit 1f4d820
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/libmodplug/snd_fx.c
Expand Up @@ -6,6 +6,7 @@

#include "libmodplug.h"
#include <stdlib.h> /* for rand() */
#define SNDFX_C
#include "tables.h"

DWORD CSoundFile_GetLength(CSoundFile *_this, BOOL bAdjust, BOOL bTotal)
Expand Down
1 change: 1 addition & 0 deletions src/libmodplug/sndmix.c
Expand Up @@ -5,6 +5,7 @@
*/

#include "libmodplug.h"
#define SNDMIX_C
#include "tables.h"

// Volume ramp length, in 1/10 ms
Expand Down
13 changes: 8 additions & 5 deletions src/libmodplug/tables.h
Expand Up @@ -6,6 +6,7 @@

#include "libmodplug.h"

#ifdef SNDFX_C
static const BYTE ImpulseTrackerPortaVolCmd[16] =
{
0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0x40, 0x60,
Expand Down Expand Up @@ -57,8 +58,9 @@ static const WORD S3MFineTuneTable[16] =
7895,7941,7985,8046,8107,8169,8232,8280,
8363,8413,8463,8529,8581,8651,8723,8757, // 8363*2^((i-8)/(12*8))
};
#endif


#ifdef SNDMIX_C
// Sinus table
static const int16_t ModSinusTable[64] =
{
Expand Down Expand Up @@ -94,17 +96,16 @@ static const int16_t ModRandomTable[64] =
-23,88,21,-94,8,106,21,-112,6,109,20,-88,-30,9,-127,118,
42,-34,89,-4,-51,-72,21,-29,112,123,84,-101,-92,98,-54,-95
};
#endif


#ifdef SNDFX_C
// volume fade tables for Retrig Note:
static const int8_t retrigTable1[16] =
{ 0, 0, 0, 0, 0, 0, 10, 8, 0, 0, 0, 0, 0, 0, 24, 32 };

static const int8_t retrigTable2[16] =
{ 0, -1, -2, -4, -8, -16, 0, 0, 0, 1, 2, 4, 8, 16, 0, 0 };



static const WORD XMPeriodTable[104] =
{
907,900,894,887,881,875,868,862,856,850,844,838,832,826,820,814,
Expand Down Expand Up @@ -216,7 +217,9 @@ static const uint32_t XMLinearTable[768] =
271508,271263,271018,270774,270530,270286,270042,269798,
269555,269312,269069,268826,268583,268341,268099,267857
};
#endif

#ifdef SNDMIX_C
static const int8_t ft2VibratoTable[256] =
{
0,-2,-3,-5,-6,-8,-9,-11,-12,-14,-16,-17,-19,-20,-22,-23,
Expand All @@ -236,7 +239,7 @@ static const int8_t ft2VibratoTable[256] =
48,47,46,45,44,43,42,41,39,38,37,36,34,33,32,30,29,27,
26,24,23,22,20,19,17,16,14,12,11,9,8,6,5,3,2
};

#endif

static const DWORD FineLinearSlideUpTable[16] =
{
Expand Down

0 comments on commit 1f4d820

Please sign in to comment.