aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/fmopl.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-26 00:37:23 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-05-04 09:16:04 +0200
commit7f643fb53a1b09f644f1fc552e1c8faf98986e53 (patch)
treee51f3ac83479dd95f75047adc364cc9a2aef51b7 /hw/audio/fmopl.h
parent7bf10b1de25c64cbec2acf2b4e0b2ce645a13b53 (diff)
audio: Remove INT32
Signed-off-by: Juan Quintela <quintela@redhat.com> Message-id: 20170425223739.6703-11-quintela@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/fmopl.h')
-rw-r--r--hw/audio/fmopl.h54
1 files changed, 24 insertions, 30 deletions
diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h
index 0bc3415cd3..1e74019586 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 :&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] */
+ int32_t *AR; /* attack rate :&AR_TABLE[AR<<2] */
+ int32_t *DR; /* decay rate :&DR_TALBE[DR<<2] */
+ int32_t SL; /* sustin level :SL_TALBE[SL] */
+ int32_t *RR; /* release rate :&DR_TABLE[RR<<2] */
uint8_t ksl; /* keyscale level :(shift down bits) */
uint8_t ksr; /* key scale rate :kcode>>KSR */
uint32_t mul; /* multiple :ML_TABLE[ML] */
@@ -51,17 +45,17 @@ typedef struct fm_opl_slot {
/* envelope generator state */
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 */
- INT32 evsa; /* envelope step for AR :AR[ksr] */
- INT32 evsd; /* envelope step for DR :DR[ksr] */
- INT32 evsr; /* envelope step for RR :RR[ksr] */
+ int32_t evc; /* envelope counter */
+ int32_t eve; /* envelope counter end point */
+ int32_t evs; /* envelope counter step */
+ int32_t evsa; /* envelope step for AR :AR[ksr] */
+ int32_t evsd; /* envelope step for DR :DR[ksr] */
+ int32_t evsr; /* envelope step for RR :RR[ksr] */
/* LFO */
uint8_t ams; /* ams flag */
uint8_t vib; /* vibrate flag */
/* wave selector */
- INT32 **wavetable;
+ int32_t **wavetable;
}OPL_SLOT;
/* ---------- OPL one of channel ---------- */
@@ -69,9 +63,9 @@ typedef struct fm_opl_channel {
OPL_SLOT SLOT[2];
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 */
+ int32_t *connect1; /* slot1 output pointer */
+ int32_t *connect2; /* slot2 output pointer */
+ int32_t op1_out[2]; /* slot1 output for selfeedback */
/* phase generator state */
uint32_t block_fnum; /* block+fnum : */
uint8_t kcode; /* key code : KeyScaleCode */
@@ -106,16 +100,16 @@ typedef struct fm_opl_f {
OPL_PORTHANDLER_W keyboardhandler_w;
int keyboard_param;
/* time tables */
- INT32 AR_TABLE[75]; /* atttack rate tables */
- INT32 DR_TABLE[75]; /* decay rate tables */
+ int32_t AR_TABLE[75]; /* atttack rate tables */
+ int32_t DR_TABLE[75]; /* decay rate tables */
uint32_t FN_TABLE[1024]; /* fnumber -> increment counter */
/* LFO */
- INT32 *ams_table;
- INT32 *vib_table;
- INT32 amsCnt;
- INT32 amsIncr;
- INT32 vibCnt;
- INT32 vibIncr;
+ int32_t *ams_table;
+ int32_t *vib_table;
+ int32_t amsCnt;
+ int32_t amsIncr;
+ int32_t vibCnt;
+ int32_t vibIncr;
/* wave selector enable flag */
uint8_t wavesel;
/* external event callback handler */