mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
use -Wall, address warnings
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@32 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
429d462315
commit
6fabc99db8
@ -69,7 +69,7 @@ fmult(
|
||||
int srn)
|
||||
{
|
||||
short anmag, anexp, anmant;
|
||||
short wanexp, wanmag, wanmant;
|
||||
short wanexp, wanmant;
|
||||
short retval;
|
||||
|
||||
anmag = (an > 0) ? an : ((-an) & 0x1FFF);
|
||||
@ -275,12 +275,11 @@ update(
|
||||
struct g72x_state *state_ptr) /* coder state pointer */
|
||||
{
|
||||
int cnt;
|
||||
short mag, exp, mant; /* Adaptive predictor, FLOAT A */
|
||||
short mag, exp; /* Adaptive predictor, FLOAT A */
|
||||
short a2p; /* LIMC */
|
||||
short a1ul; /* UPA1 */
|
||||
short ua2, pks1; /* UPA2 */
|
||||
short uga2a, fa1;
|
||||
short uga2b;
|
||||
short pks1; /* UPA2 */
|
||||
short fa1;
|
||||
char tr; /* tone/transition detector */
|
||||
short ylint, thr2, dqthr;
|
||||
short ylfrac, thr1;
|
||||
@ -368,11 +367,12 @@ update(
|
||||
/* UPA1 */
|
||||
/* update predictor pole a[0] */
|
||||
state_ptr->a[0] -= state_ptr->a[0] >> 8;
|
||||
if (dqsez != 0)
|
||||
if (dqsez != 0) {
|
||||
if (pks1 == 0)
|
||||
state_ptr->a[0] += 192;
|
||||
else
|
||||
state_ptr->a[0] -= 192;
|
||||
}
|
||||
|
||||
/* LIMD */
|
||||
a1ul = 15360 - a2p;
|
||||
@ -453,7 +453,6 @@ update(
|
||||
state_ptr->ap += (-state_ptr->ap) >> 4;
|
||||
}
|
||||
|
||||
static short qtab_721[7] = {-124, 80, 178, 246, 300, 349, 400};
|
||||
/*
|
||||
* Maps G.721 code word to reconstructed scale factor normalized log
|
||||
* magnitude values.
|
||||
|
@ -5,5 +5,6 @@
|
||||
#include "../streamtypes.h"
|
||||
|
||||
void decode_g721(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void g72x_init_state(struct g72x_state *state_ptr);
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@ VGMSTREAM * init_vgmstream_rsf(const char * const filename) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
STREAMFILE * infile = NULL;
|
||||
|
||||
int i;
|
||||
size_t file_size;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "coding/adx_decoder.h"
|
||||
#include "coding/gcdsp_decoder.h"
|
||||
#include "coding/pcm_decoder.h"
|
||||
#include "coding/ima_decoder.h"
|
||||
#include "coding/ngc_dtk_decoder.h"
|
||||
#include "coding/g721_decoder.h"
|
||||
|
||||
@ -286,8 +287,8 @@ int vgmstream_do_loop(VGMSTREAM * vgmstream) {
|
||||
/* if (vgmstream->loop_flag) {*/
|
||||
/* is this the loop end? */
|
||||
if (vgmstream->current_sample==vgmstream->loop_end_sample) {
|
||||
int i;
|
||||
/*
|
||||
int i;
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->loop_ch[i].adpcm_history1_32 = vgmstream->ch[i].adpcm_history1_32;
|
||||
vgmstream->loop_ch[i].adpcm_history2_32 = vgmstream->ch[i].adpcm_history2_32;
|
||||
|
@ -18,14 +18,9 @@ typedef enum {
|
||||
coding_PCM8, /* 8-bit PCM */
|
||||
/* 4-bit ADPCM */
|
||||
coding_NDS_IMA, /* IMA ADPCM w/ NDS layout */
|
||||
coding_XBOX_IMA, /* IMA ADPCM w/ XBOX layout */
|
||||
coding_CRI_ADX, /* CRI ADX */
|
||||
coding_NGC_DSP, /* NGC ADPCM, called DSP */
|
||||
coding_NGC_AFC, /* other NGC ADPCM, called AFC */
|
||||
coding_NGC_DTK, /* NGC hardware disc ADPCM, called DTK, TRK or ADP */
|
||||
coding_PS2ADPCM, /* PS2 ADPCM, sometimes called "VAG" */
|
||||
coding_EA_XA, /* Electronic Arts XA */
|
||||
coding_CD_XA, /* CD-XA */
|
||||
coding_G721, /* CCITT G.721 ADPCM */
|
||||
} coding_t;
|
||||
|
||||
@ -36,11 +31,13 @@ typedef enum {
|
||||
/* interleave */
|
||||
layout_interleave, /* equal interleave throughout the stream */
|
||||
layout_interleave_shortblock, /* interleave with a short last block */
|
||||
#if 0
|
||||
layout_interleave_byte, /* full byte interleave */
|
||||
/* headered blocks */
|
||||
layout_halp_blocked, /* blocks with HALP-format header */
|
||||
layout_ast_blocked, /* */
|
||||
layout_strm_blocked, /* */
|
||||
#endif
|
||||
/* otherwise odd */
|
||||
layout_dtk_interleave, /* dtk interleaves channels by nibble */
|
||||
} layout_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
SHELL = /bin/sh
|
||||
CFLAGS=-lm -O3
|
||||
CFLAGS=-lm -Wall
|
||||
|
||||
VGMSTREAMFILES = ../src/streamfile.c ../src/vgmstream.c ../src/util.c ../src/meta/adx_header.c ../src/coding/adx_decoder.c ../src/coding/gcdsp_decoder.c ../src/meta/brstm.c ../src/layout/interleave.c ../src/layout/nolayout.c ../src/coding/pcm_decoder.c ../src/meta/nds_strm.c ../src/coding/ima_decoder.c ../src/meta/agsc.c ../src/meta/ngc_adpdtk.c ../src/coding/ngc_dtk_decoder.c ../src/coding/g721_decoder.c ../src/meta/rsf.c
|
||||
|
||||
|
@ -152,4 +152,6 @@ int main(int argc, char ** argv) {
|
||||
}
|
||||
|
||||
close_vgmstream(s);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user