From patchwork Fri Aug 28 18:06:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 32392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id E96FDB7B99 for ; Sat, 29 Aug 2009 04:17:37 +1000 (EST) Received: from localhost ([127.0.0.1]:41718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh610-0002PV-V8 for incoming@patchwork.ozlabs.org; Fri, 28 Aug 2009 14:17:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mh5tO-00005a-JJ 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-0008Tw-EE for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:39 -0400 Received: from [199.232.76.173] (port=46617 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5tG-0008Tc-DS for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56646) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mh5tF-0000K2-L8 for qemu-devel@nongnu.org; Fri, 28 Aug 2009 14:09:34 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7SI9Mux026040; Fri, 28 Aug 2009 14:09:22 -0400 Received: from localhost.localdomain (vpn2-8-222.ams2.redhat.com [10.36.8.222]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7SI9HOt003911; Fri, 28 Aug 2009 14:09:21 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 28 Aug 2009 20:06:49 +0200 Message-Id: <38be88f75516e586fe8fe8c1d5fac38afb7fc86e.1251482708.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 2/6] audio: s/UINT8/uint8_t X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/fmopl.c | 10 +++++----- hw/fmopl.h | 43 ++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/hw/fmopl.c b/hw/fmopl.c index d1161f8..dd8e6a4 100644 --- a/hw/fmopl.c +++ b/hw/fmopl.c @@ -791,8 +791,8 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) } else { /* set IRQ mask ,timer enable*/ - UINT8 st1 = v&1; - UINT8 st2 = (v>>1)&1; + uint8_t st1 = v&1; + uint8_t st2 = (v>>1)&1; /* IRQRST,T1MSK,t2MSK,EOSMSK,BRMSK,x,ST2,ST1 */ OPL_STATUS_RESET(OPL,v&0x78); OPL_STATUSMASK_SET(OPL,((~v)&0x78)|0x01); @@ -891,7 +891,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) case 0xbd: /* amsep,vibdep,r,bd,sd,tom,tc,hh */ { - UINT8 rkey = OPL->rythm^v; + uint8_t rkey = OPL->rythm^v; OPL->ams_table = &AMS_TABLE[v&0x80 ? AMS_ENT : 0]; OPL->vib_table = &VIB_TABLE[v&0x40 ? VIB_ENT : 0]; OPL->rythm = v&0x3f; @@ -1045,7 +1045,7 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) OPLSAMPLE *buf = buffer; UINT32 amsCnt = OPL->amsCnt; UINT32 vibCnt = OPL->vibCnt; - UINT8 rythm = OPL->rythm&0x20; + uint8_t rythm = OPL->rythm&0x20; OPL_CH *CH,*R_CH; if( (void *)OPL != cur_chip ){ @@ -1106,7 +1106,7 @@ void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) OPLSAMPLE *buf = buffer; UINT32 amsCnt = OPL->amsCnt; UINT32 vibCnt = OPL->vibCnt; - UINT8 rythm = OPL->rythm&0x20; + 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 12c78cb..f42c803 100644 --- a/hw/fmopl.h +++ b/hw/fmopl.h @@ -1,6 +1,8 @@ #ifndef __FMOPL_H_ #define __FMOPL_H_ +#include + /* --- select emulation chips --- */ #define BUILD_YM3812 (HAS_YM3812) //#define BUILD_YM3526 (HAS_YM3526) @@ -13,7 +15,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef unsigned char UINT8; /* unsigned 8bit */ typedef unsigned int UINT32; /* unsigned 32bit */ typedef signed char INT8; /* signed 8bit */ typedef signed short INT16; /* signed 16bit */ @@ -50,19 +51,19 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); typedef struct fm_opl_slot { INT32 TL; /* total level :TL << 8 */ INT32 TLL; /* adjusted now TL */ - UINT8 KSR; /* key scale rate :(shift down bit) */ + uint8_t KSR; /* key scale rate :(shift down bit) */ INT32 *AR; /* attack rate :&AR_TABLE[AR<<2] */ INT32 *DR; /* decay rate :&DR_TALBE[DR<<2] */ INT32 SL; /* sustin level :SL_TALBE[SL] */ INT32 *RR; /* release rate :&DR_TABLE[RR<<2] */ - UINT8 ksl; /* keyscale level :(shift down bits) */ - UINT8 ksr; /* key scale rate :kcode>>KSR */ + 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 : */ /* envelope generator state */ - UINT8 eg_typ; /* envelope type flag */ - UINT8 evm; /* envelope phase */ + uint8_t eg_typ; /* envelope type flag */ + uint8_t evm; /* envelope phase */ INT32 evc; /* envelope counter */ INT32 eve; /* envelope counter end point */ INT32 evs; /* envelope counter step */ @@ -70,8 +71,8 @@ typedef struct fm_opl_slot { INT32 evsd; /* envelope step for DR :DR[ksr] */ INT32 evsr; /* envelope step for RR :RR[ksr] */ /* LFO */ - UINT8 ams; /* ams flag */ - UINT8 vib; /* vibrate flag */ + uint8_t ams; /* ams flag */ + uint8_t vib; /* vibrate flag */ /* wave selector */ INT32 **wavetable; }OPL_SLOT; @@ -79,45 +80,45 @@ typedef struct fm_opl_slot { /* ---------- OPL one of channel ---------- */ typedef struct fm_opl_channel { OPL_SLOT SLOT[2]; - UINT8 CON; /* connection type */ - UINT8 FB; /* feed back :(shift down bit) */ + uint8_t CON; /* connection type */ + uint8_t FB; /* feed back :(shift down bit) */ INT32 *connect1; /* slot1 output pointer */ INT32 *connect2; /* slot2 output pointer */ INT32 op1_out[2]; /* slot1 output for selfeedback */ /* phase generator state */ UINT32 block_fnum; /* block+fnum : */ - UINT8 kcode; /* key code : KeyScaleCode */ + uint8_t kcode; /* key code : KeyScaleCode */ UINT32 fc; /* Freq. Increment base */ UINT32 ksl_base; /* KeyScaleLevel Base step */ - UINT8 keyon; /* key on/off flag */ + uint8_t keyon; /* key on/off flag */ } OPL_CH; /* OPL state */ typedef struct fm_opl_f { - UINT8 type; /* chip type */ + uint8_t type; /* chip type */ int clock; /* master clock (Hz) */ int rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ double TimerBase; /* Timer base time (==sampling time) */ - UINT8 address; /* address register */ - UINT8 status; /* status flag */ - UINT8 statusmask; /* status mask */ + uint8_t address; /* address register */ + uint8_t status; /* status flag */ + uint8_t statusmask; /* status mask */ UINT32 mode; /* Reg.08 : CSM , notesel,etc. */ /* Timer */ int T[2]; /* timer counter */ - UINT8 st[2]; /* timer enable */ + uint8_t st[2]; /* timer enable */ /* FM channel slots */ OPL_CH *P_CH; /* pointer of CH */ int max_ch; /* maximum channel */ /* Rythm sention */ - UINT8 rythm; /* Rythm mode , key flag */ + uint8_t rythm; /* Rythm mode , key flag */ #if BUILD_Y8950 /* Delta-T ADPCM unit (Y8950) */ YM_DELTAT *deltat; /* DELTA-T ADPCM */ #endif /* Keyboard / I/O interface unit (Y8950) */ - UINT8 portDirection; - UINT8 portLatch; + uint8_t portDirection; + uint8_t portLatch; OPL_PORTHANDLER_R porthandler_r; OPL_PORTHANDLER_W porthandler_w; int port_param; @@ -136,7 +137,7 @@ typedef struct fm_opl_f { INT32 vibCnt; INT32 vibIncr; /* wave selector enable flag */ - UINT8 wavesel; + uint8_t wavesel; /* external event callback handler */ OPL_TIMERHANDLER TimerHandler; /* TIMER handler */ int TimerParam; /* TIMER parameter */