forked from len0rd/rockbox
Cosmetic changes to remove compiler warnings and compile cleanly under Rockbox
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6015 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8243127dc4
commit
52e43cb6e1
9 changed files with 55 additions and 29 deletions
|
|
@ -11,4 +11,6 @@ registry.c
|
|||
res012.c
|
||||
sharedbook.c
|
||||
synthesis.c
|
||||
vorbisfile.c
|
||||
window.c
|
||||
ctype.c
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){
|
|||
/* Read in bits without advancing the bitptr; bits <= 32 */
|
||||
long oggpack_look(oggpack_buffer *b,int bits){
|
||||
unsigned long m=mask[bits];
|
||||
unsigned long ret;
|
||||
unsigned long ret=0;
|
||||
|
||||
bits+=b->headbit;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ int oggpack_eop(oggpack_buffer *b){
|
|||
/* bits <= 32 */
|
||||
long oggpack_read(oggpack_buffer *b,int bits){
|
||||
unsigned long m=mask[bits];
|
||||
ogg_uint32_t ret;
|
||||
ogg_uint32_t ret=0;
|
||||
|
||||
bits+=b->headbit;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,8 @@
|
|||
/* a52dec profiling */
|
||||
/* #undef A52DEC_GPROF */
|
||||
|
||||
/* Define to 1 if you have the `memalign' function. */
|
||||
/* #undef HAVE_MEMALIGN 1 */
|
||||
|
||||
/* liba52 djbfft support */
|
||||
/* #undef LIBA52_DJBFFT */
|
||||
|
||||
/* a52 sample precision */
|
||||
/* #undef LIBA52_DOUBLE */
|
||||
|
||||
/* use fixed-point arithmetic */
|
||||
#define LIBA52_FIXED
|
||||
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
|
||||
/* Used in bitstream.h */
|
||||
#define BYTE_ORDER 1
|
||||
#define BIG_ENDIAN 1
|
||||
#define LITTLE_ENDIAN 0
|
||||
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#ifdef SIMULATOR
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
|
|
|
|||
22
apps/codecs/Tremor/ctype.c
Normal file
22
apps/codecs/Tremor/ctype.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <ctype.h>
|
||||
|
||||
const char _ctype_[257]={
|
||||
0,
|
||||
_C, _C, _C, _C, _C, _C, _C, _C,
|
||||
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
|
||||
_C, _C, _C, _C, _C, _C, _C, _C,
|
||||
_C, _C, _C, _C, _C, _C, _C, _C,
|
||||
_S|_B, _P, _P, _P, _P, _P, _P, _P,
|
||||
_P, _P, _P, _P, _P, _P, _P, _P,
|
||||
_N, _N, _N, _N, _N, _N, _N, _N,
|
||||
_N, _N, _P, _P, _P, _P, _P, _P,
|
||||
_P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
|
||||
_U, _U, _U, _U, _U, _U, _U, _U,
|
||||
_U, _U, _U, _U, _U, _U, _U, _U,
|
||||
_U, _U, _U, _P, _P, _P, _P, _P,
|
||||
_P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
|
||||
_L, _L, _L, _L, _L, _L, _L, _L,
|
||||
_L, _L, _L, _L, _L, _L, _L, _L,
|
||||
_L, _L, _L, _P, _P, _P, _P, _C
|
||||
};
|
||||
|
||||
|
|
@ -139,6 +139,7 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
|
|||
ogg_int32_t ampoffset,
|
||||
ogg_int32_t *icos){
|
||||
|
||||
(void)ln;
|
||||
/* 0 <= m < 256 */
|
||||
|
||||
/* set up for using all int later */
|
||||
|
|
@ -343,7 +344,7 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
static vorbis_look_floor *floor0_look (vorbis_dsp_state *vd,vorbis_info_mode *mi,
|
||||
vorbis_info_floor *i){
|
||||
int j;
|
||||
ogg_int32_t scale;
|
||||
// ogg_int32_t scale;
|
||||
vorbis_info *vi=vd->vi;
|
||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||
vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
|
||||
|
|
@ -413,6 +414,7 @@ static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,
|
|||
void *memo,ogg_int32_t *out){
|
||||
vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
|
||||
vorbis_info_floor0 *info=look->vi;
|
||||
(void)vb;
|
||||
|
||||
if(memo){
|
||||
ogg_int32_t *lsp=(ogg_int32_t *)memo;
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@ static vorbis_look_floor *floor1_look(vorbis_dsp_state *vd,vorbis_info_mode *mi,
|
|||
vorbis_look_floor1 *look=(vorbis_look_floor1 *)_ogg_calloc(1,sizeof(*look));
|
||||
int i,j,n=0;
|
||||
|
||||
(void)vd;
|
||||
(void)mi;
|
||||
look->vi=info;
|
||||
look->n=info->postlist[1];
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ extern "C"
|
|||
#include <stdio.h>
|
||||
#include "ivorbiscodec.h"
|
||||
|
||||
|
||||
#define CHUNKSIZE 1024
|
||||
/* The function prototypes for the callbacks are basically the same as for
|
||||
* the stdio functions fread, fseek, fclose, ftell.
|
||||
|
|
@ -86,11 +87,11 @@ typedef struct OggVorbis_File {
|
|||
} OggVorbis_File;
|
||||
|
||||
extern int ov_clear(OggVorbis_File *vf);
|
||||
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
||||
//extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
||||
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
|
||||
char *initial, long ibytes, ov_callbacks callbacks);
|
||||
|
||||
extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
||||
//extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
||||
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
|
||||
char *initial, long ibytes, ov_callbacks callbacks);
|
||||
extern int ov_test_open(OggVorbis_File *vf);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@
|
|||
|
||||
#include "asm_arm.h"
|
||||
|
||||
|
||||
/* Some prototypes that were not defined elsewhere */
|
||||
#include <stdlib.h>
|
||||
void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
|
||||
void _vorbis_block_ripcord(vorbis_block *vb);
|
||||
extern int _ilog(unsigned int v);
|
||||
void* alloca(size_t size);
|
||||
|
||||
#ifndef _V_WIDE_MATH
|
||||
#define _V_WIDE_MATH
|
||||
|
||||
|
|
|
|||
|
|
@ -657,10 +657,12 @@ static int _fetch_and_process_packet(OggVorbis_File *vf,
|
|||
|
||||
/* if, eg, 64 bit stdio is configured by default, this will build with
|
||||
fseek64 */
|
||||
#if 0
|
||||
static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
|
||||
if(f==NULL)return(-1);
|
||||
return fseek(f,off,whence);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
|
||||
long ibytes, ov_callbacks callbacks){
|
||||
|
|
@ -764,6 +766,7 @@ int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
|
|||
return _ov_open2(vf);
|
||||
}
|
||||
|
||||
#if 0
|
||||
int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
|
||||
ov_callbacks callbacks = {
|
||||
(size_t (*)(void *, size_t, size_t, void *)) fread,
|
||||
|
|
@ -774,6 +777,7 @@ int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
|
|||
|
||||
return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Only partially open the vorbis file; test for Vorbisness, and load
|
||||
the headers for the first chain. Do not seek (although test for
|
||||
|
|
@ -786,6 +790,7 @@ int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
|
|||
return _ov_open1(f,vf,initial,ibytes,callbacks);
|
||||
}
|
||||
|
||||
#if 0
|
||||
int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
|
||||
ov_callbacks callbacks = {
|
||||
(size_t (*)(void *, size_t, size_t, void *)) fread,
|
||||
|
|
@ -796,6 +801,7 @@ int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
|
|||
|
||||
return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks);
|
||||
}
|
||||
#endif
|
||||
|
||||
int ov_test_open(OggVorbis_File *vf){
|
||||
if(vf->ready_state!=PARTOPEN)return(OV_EINVAL);
|
||||
|
|
@ -988,7 +994,7 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){
|
|||
int lastblock=0;
|
||||
int accblock=0;
|
||||
int thisblock;
|
||||
int eosflag;
|
||||
int eosflag=0;
|
||||
|
||||
work_os=ogg_stream_create(vf->current_serialno); /* get the memory ready */
|
||||
while(1){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue