From d75baf2eee5ddd155009e7f0a79b175ae6026762 Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Fri, 12 Feb 2010 16:28:30 -0800 Subject: Replace Tremor with Tremolo (an ARM optimised version of the Tremor library for doing Ogg Vorbis decompression) --- Android.mk | 15 ++++++++++----- Tremolo/codebook.c | 2 +- Tremolo/vorbisfile.c | 8 ++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Android.mk b/Android.mk index f0d1b4b..9e3a0a0 100644 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,3 @@ -ifeq ($(TARGET_ARCH),arm) LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -15,14 +14,21 @@ LOCAL_SRC_FILES = \ Tremolo/misc.c \ Tremolo/res012.c \ Tremolo/treminfo.c \ - Tremolo/vorbisfile.c \ + Tremolo/vorbisfile.c + +ifeq ($(TARGET_ARCH),arm) +LOCAL_SRC_FILES += \ Tremolo/bitwiseARM.s \ Tremolo/dpen.s \ Tremolo/floor1ARM.s \ Tremolo/mdctARM.s - -LOCAL_CFLAGS+= -O2 \ +LOCAL_CFLAGS += \ -D_ARM_ASSEM_ +else +LOCAL_CFLAGS += \ + -DONLY_C +endif +LOCAL_CFLAGS+= -O2 LOCAL_C_INCLUDES:= \ $(LOCAL_PATH)/Tremolo @@ -32,4 +38,3 @@ LOCAL_ARM_MODE := arm LOCAL_MODULE := libvorbisidec include $(BUILD_SHARED_LIBRARY) -endif diff --git a/Tremolo/codebook.c b/Tremolo/codebook.c index 5f46594..0a9c104 100644 --- a/Tremolo/codebook.c +++ b/Tremolo/codebook.c @@ -679,7 +679,7 @@ static inline ogg_uint32_t decode_packed_entry_number(codebook *book, } case 4: { - Output("32/32"); + //Output("32/32"); for(i=0;idec_table))[chase*2+((lok>>i)&1)]; if(chase&0x80000000UL)break; diff --git a/Tremolo/vorbisfile.c b/Tremolo/vorbisfile.c index 7b6ce47..7ed3012 100644 --- a/Tremolo/vorbisfile.c +++ b/Tremolo/vorbisfile.c @@ -18,7 +18,7 @@ #include #include -//#include +//#include #include #include @@ -28,7 +28,7 @@ #include "os.h" #include "misc.h" -int errno; +int gerrno; #define NOTOPEN 0 #define PARTOPEN 1 @@ -69,12 +69,12 @@ int errno; /* read a little more data from the file/pipe into the ogg_sync framer */ static long _get_data(OggVorbis_File *vf){ - errno=0; + gerrno=0; if(vf->datasource){ unsigned char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE); long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource); if(bytes>0)ogg_sync_wrote(vf->oy,bytes); - if(bytes==0 && errno)return -1; + if(bytes==0 && gerrno)return -1; return bytes; }else return 0; -- cgit v1.1