Re: [Qemu-devel] [PATCH 10/26] audio: Remove INT32
Philippe Mathieu-Daudéwrote: > Hi Juan, is there a benefit in not squashing the previous stdint commits? Easier to commit/review/rebase. I can do if you preffer. Later, Juan.
Re: [Qemu-devel] [PATCH 10/26] audio: Remove INT32
Hi Juan, is there a benefit in not squashing the previous stdint commits? On 04/25/2017 07:37 PM, Juan Quintela wrote: Signed-off-by: Juan Quintela--- hw/audio/fmopl.c | 42 +- hw/audio/fmopl.h | 54 -- 2 files changed, 45 insertions(+), 51 deletions(-) diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index ebd3dbb..8f935f6 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -170,7 +170,7 @@ static const uint32_t KSL_TABLE[8*16]= /* sustain lebel table (3db per step) */ /* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/ #define SC(db) (db*((3/EG_STEP)*(1< connect1 = CH->CON ? carrier : CH->connect2 = carrier; } @@ -498,7 +498,7 @@ static inline void OPL_CALC_RH( OPL_CH *CH ) { uint32_t env_tam,env_sd,env_top,env_hh; int whitenoise = (rand()&1)*(WHITE_NOISE_db/EG_STEP); - INT32 tone8; + int32_t tone8; OPL_SLOT *SLOT; int env_out; @@ -616,20 +616,20 @@ static int OPLOpenTable( void ) double pom; /* allocate dynamic tables */ - if( (TL_TABLE = malloc(TL_MAX*2*sizeof(INT32))) == NULL) + if( (TL_TABLE = malloc(TL_MAX*2*sizeof(int32_t))) == NULL) return 0; - if( (SIN_TABLE = malloc(SIN_ENT*4 *sizeof(INT32 *))) == NULL) + if( (SIN_TABLE = malloc(SIN_ENT*4 *sizeof(int32_t *))) == NULL) { free(TL_TABLE); return 0; } - if( (AMS_TABLE = malloc(AMS_ENT*2 *sizeof(INT32))) == NULL) + if( (AMS_TABLE = malloc(AMS_ENT*2 *sizeof(int32_t))) == NULL) { free(TL_TABLE); free(SIN_TABLE); return 0; } - if( (VIB_TABLE = malloc(VIB_ENT*2 *sizeof(INT32))) == NULL) + if( (VIB_TABLE = malloc(VIB_ENT*2 *sizeof(int32_t))) == NULL) { free(TL_TABLE); free(SIN_TABLE); diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 0bc3415..1e74019 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -7,12 +7,6 @@ /* select bit size of output : 8 or 16 */ #define OPL_OUTPUT_BIT 16 -/* compiler dependence */ -#ifndef OSD_CPU_H -#define OSD_CPU_H -typedef signed int INT32; /* signed 32bit */ -#endif - #if (OPL_OUTPUT_BIT==16) typedef int16_t OPLSAMPLE; #endif @@ -36,13 +30,13 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); /* Saving is necessary for member of the 'R' mark for suspend/resume */ /* -- OPL one of slot -- */ typedef struct fm_opl_slot { - INT32 TL; /* total level :TL << 8*/ - INT32 TLL; /* adjusted now TL */ + int32_t TL; /* total level :TL << 8*/ + int32_t TLL;/* adjusted now TL */ uint8_t
[Qemu-devel] [PATCH 10/26] audio: Remove INT32
Signed-off-by: Juan Quintela--- hw/audio/fmopl.c | 42 +- hw/audio/fmopl.h | 54 -- 2 files changed, 45 insertions(+), 51 deletions(-) diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index ebd3dbb..8f935f6 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -170,7 +170,7 @@ static const uint32_t KSL_TABLE[8*16]= /* sustain lebel table (3db per step) */ /* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/ #define SC(db) (db*((3/EG_STEP)*(1< connect1 = CH->CON ? carrier : CH->connect2 = carrier; } @@ -498,7 +498,7 @@ static inline void OPL_CALC_RH( OPL_CH *CH ) { uint32_t env_tam,env_sd,env_top,env_hh; int whitenoise = (rand()&1)*(WHITE_NOISE_db/EG_STEP); - INT32 tone8; + int32_t tone8; OPL_SLOT *SLOT; int env_out; @@ -616,20 +616,20 @@ static int OPLOpenTable( void ) double pom; /* allocate dynamic tables */ - if( (TL_TABLE = malloc(TL_MAX*2*sizeof(INT32))) == NULL) + if( (TL_TABLE = malloc(TL_MAX*2*sizeof(int32_t))) == NULL) return 0; - if( (SIN_TABLE = malloc(SIN_ENT*4 *sizeof(INT32 *))) == NULL) + if( (SIN_TABLE = malloc(SIN_ENT*4 *sizeof(int32_t *))) == NULL) { free(TL_TABLE); return 0; } - if( (AMS_TABLE = malloc(AMS_ENT*2 *sizeof(INT32))) == NULL) + if( (AMS_TABLE = malloc(AMS_ENT*2 *sizeof(int32_t))) == NULL) { free(TL_TABLE); free(SIN_TABLE); return 0; } - if( (VIB_TABLE = malloc(VIB_ENT*2 *sizeof(INT32))) == NULL) + if( (VIB_TABLE = malloc(VIB_ENT*2 *sizeof(int32_t))) == NULL) { free(TL_TABLE); free(SIN_TABLE); diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 0bc3415..1e74019 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -7,12 +7,6 @@ /* select bit size of output : 8 or 16 */ #define OPL_OUTPUT_BIT 16 -/* compiler dependence */ -#ifndef OSD_CPU_H -#define OSD_CPU_H -typedef signed int INT32; /* signed 32bit */ -#endif - #if (OPL_OUTPUT_BIT==16) typedef int16_t OPLSAMPLE; #endif @@ -36,13 +30,13 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); /* Saving is necessary for member of the 'R' mark for suspend/resume */ /* -- OPL one of slot -- */ typedef struct fm_opl_slot { - INT32 TL; /* total level :TL << 8*/ - INT32 TLL; /* adjusted now TL */ + int32_t TL; /* total level :TL << 8*/ + int32_t TLL;/* adjusted now TL */ uint8_t KSR; /* key scale rate :(shift down bit) */ - INT32 *AR; /* attack rate