From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mh5tO-00005D-HJ for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mh5tH-0008Tk-53 for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:39 -0400 Received: from [199.232.76.173] (port=46621 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5tG-0008Tg-I7 for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52115) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mh5tF-0000KB-RI for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:34 -0400 From: Juan Quintela Date: Fri, 28 Aug 2009 20:06:50 +0200 Message-Id: <36a8440344b191fe9a38993bb07f5b1d49e3fd2f.1251482708.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 3/6] audio: s/UINT32/uint32_t List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Juan Quintela --- hw/fmopl.c | 18 +++++++++--------- hw/fmopl.h | 17 ++++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/hw/fmopl.c b/hw/fmopl.c index dd8e6a4..1bec9d4 100644 --- a/hw/fmopl.c +++ b/hw/fmopl.c @@ -124,7 +124,7 @@ static const int slot_array[32]= /* key scale level */ /* table is 3dB/OCT , DV converts this in TL step at 6dB/OCT */ #define DV (EG_STEP/2) -static const UINT32 KSL_TABLE[8*16]= +static const uint32_t KSL_TABLE[8*16]= { /* OCT 0 */ 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, @@ -197,7 +197,7 @@ static INT32 ENV_CURVE[2*EG_ENT+1]; /* multiple table */ #define ML 2 -static const UINT32 MUL_TABLE[16]= { +static const uint32_t MUL_TABLE[16]= { /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15 */ 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML, 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML @@ -321,7 +321,7 @@ INLINE void OPL_KEYOFF(OPL_SLOT *SLOT) /* ---------- calcrate Envelope Generator & Phase Generator ---------- */ /* return : envelope output */ -INLINE UINT32 OPL_CALC_SLOT( OPL_SLOT *SLOT ) +INLINE uint32_t OPL_CALC_SLOT( OPL_SLOT *SLOT ) { /* calcrate envelope generator */ if( (SLOT->evc+=SLOT->evs) >= SLOT->eve ) @@ -453,7 +453,7 @@ INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v) /* ---------- calcrate one of channel ---------- */ INLINE void OPL_CALC_CH( OPL_CH *CH ) { - UINT32 env_out; + uint32_t env_out; OPL_SLOT *SLOT; feedback2 = 0; @@ -498,7 +498,7 @@ INLINE void OPL_CALC_CH( OPL_CH *CH ) #define WHITE_NOISE_db 6.0 INLINE void OPL_CALC_RH( OPL_CH *CH ) { - UINT32 env_tam,env_sd,env_top,env_hh; + uint32_t env_tam,env_sd,env_top,env_hh; int whitenoise = (rand()&1)*(WHITE_NOISE_db/EG_STEP); INT32 tone8; @@ -1043,8 +1043,8 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) int i; int data; OPLSAMPLE *buf = buffer; - UINT32 amsCnt = OPL->amsCnt; - UINT32 vibCnt = OPL->vibCnt; + uint32_t amsCnt = OPL->amsCnt; + uint32_t vibCnt = OPL->vibCnt; uint8_t rythm = OPL->rythm&0x20; OPL_CH *CH,*R_CH; @@ -1104,8 +1104,8 @@ void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) int i; int data; OPLSAMPLE *buf = buffer; - UINT32 amsCnt = OPL->amsCnt; - UINT32 vibCnt = OPL->vibCnt; + uint32_t amsCnt = OPL->amsCnt; + uint32_t vibCnt = OPL->vibCnt; uint8_t rythm = OPL->rythm&0x20; OPL_CH *CH,*R_CH; YM_DELTAT *DELTAT = OPL->deltat; diff --git a/hw/fmopl.h b/hw/fmopl.h index f42c803..2945d95 100644 --- a/hw/fmopl.h +++ b/hw/fmopl.h @@ -15,7 +15,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef unsigned int UINT32; /* unsigned 32bit */ typedef signed char INT8; /* signed 8bit */ typedef signed short INT16; /* signed 16bit */ typedef signed int INT32; /* signed 32bit */ @@ -58,9 +57,9 @@ typedef struct fm_opl_slot { INT32 *RR; /* release rate :&DR_TABLE[RR<<2] */ uint8_t ksl; /* keyscale level :(shift down bits) */ uint8_t ksr; /* key scale rate :kcode>>KSR */ - UINT32 mul; /* multiple :ML_TABLE[ML] */ - UINT32 Cnt; /* frequency count : */ - UINT32 Incr; /* frequency step : */ + uint32_t mul; /* multiple :ML_TABLE[ML] */ + uint32_t Cnt; /* frequency count : */ + uint32_t Incr; /* frequency step : */ /* envelope generator state */ uint8_t eg_typ; /* envelope type flag */ uint8_t evm; /* envelope phase */ @@ -86,10 +85,10 @@ typedef struct fm_opl_channel { INT32 *connect2; /* slot2 output pointer */ INT32 op1_out[2]; /* slot1 output for selfeedback */ /* phase generator state */ - UINT32 block_fnum; /* block+fnum : */ + uint32_t block_fnum; /* block+fnum : */ uint8_t kcode; /* key code : KeyScaleCode */ - UINT32 fc; /* Freq. Increment base */ - UINT32 ksl_base; /* KeyScaleLevel Base step */ + uint32_t fc; /* Freq. Increment base */ + uint32_t ksl_base; /* KeyScaleLevel Base step */ uint8_t keyon; /* key on/off flag */ } OPL_CH; @@ -103,7 +102,7 @@ typedef struct fm_opl_f { uint8_t address; /* address register */ uint8_t status; /* status flag */ uint8_t statusmask; /* status mask */ - UINT32 mode; /* Reg.08 : CSM , notesel,etc. */ + uint32_t mode; /* Reg.08 : CSM , notesel,etc. */ /* Timer */ int T[2]; /* timer counter */ uint8_t st[2]; /* timer enable */ @@ -128,7 +127,7 @@ typedef struct fm_opl_f { /* time tables */ INT32 AR_TABLE[75]; /* atttack rate tables */ INT32 DR_TABLE[75]; /* decay rate tables */ - UINT32 FN_TABLE[1024]; /* fnumber -> increment counter */ + uint32_t FN_TABLE[1024]; /* fnumber -> increment counter */ /* LFO */ INT32 *ams_table; INT32 *vib_table; -- 1.6.2.5