diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-05 16:46:51 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-05 16:47:16 +0100 |
commit | bc56fd3a23c94302937ed023d33e17a2de1a1b2a (patch) | |
tree | b337e9ef5cbd6ffa34750a09d6f6c48d4b72ae5c /hw/audio/gusemu.h | |
parent | dd76c10f9fa25f1117d28bca09c6bce0c53d2a3f (diff) | |
parent | 9ea5ada76f34a0ef048b131c3a166d8564199bdb (diff) |
Merge remote-tracking branch 'kraxel/tags/pull-audio-20170504-1' into staging
audio: cleanups, bugfixes (memory leaks).
# gpg: Signature made Thu 04 May 2017 08:16:50 AM BST
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* kraxel/tags/pull-audio-20170504-1: (30 commits)
audio: Use ARRAY_SIZE from qemu/osdep.h
audio: un-export OPLResetChip
audio: Remove unused typedefs
audio: UpdateHandler is not used anymore
audio: IRQHandler is not used anymore
audio: OPLSetUpdateHandler is not used anywhere
audio: OPLSetIRQHandler is not used anywhere
audio: GUSsample is int16_t
audio: GUSword is uint16_t
audio: GUSword is uint16_t
audio: remove GUSchar
audio: GUSbyte is uint8_t
audio: Remove unused fields
audio: Remove type field
audio: Remove Unused OPL_TYPE_*
audio: Unfold OPLSAMPLE
audio: Remove INT32
audio: remove INT16
audio: Remove INT8
audio: remove UINT32
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/audio/gusemu.h')
-rw-r--r-- | hw/audio/gusemu.h | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/hw/audio/gusemu.h b/hw/audio/gusemu.h index 9aec7bf8e7..ab591eefb7 100644 --- a/hw/audio/gusemu.h +++ b/hw/audio/gusemu.h @@ -25,26 +25,10 @@ #ifndef GUSEMU_H #define GUSEMU_H -/* data types (need to be adjusted if neither a VC6 nor a C99 compatible compiler is used) */ - -#if defined _WIN32 && defined _MSC_VER /* doesn't support other win32 compilers yet, do it yourself... */ - typedef unsigned char GUSbyte; - typedef unsigned short GUSword; - typedef unsigned int GUSdword; - typedef signed char GUSchar; - typedef signed short GUSsample; -#else - typedef int8_t GUSchar; - typedef uint8_t GUSbyte; - typedef uint16_t GUSword; - typedef uint32_t GUSdword; - typedef int16_t GUSsample; -#endif - typedef struct _GUSEmuState { - GUSbyte *himemaddr; /* 1024*1024 bytes used for storing uploaded samples (+32 additional bytes for read padding) */ - GUSbyte *gusdatapos; /* (gusdataend-gusdata) bytes used for storing emulated GF1/mixer register states (32*32+4 bytes in initial GUSemu32 version) */ + uint8_t *himemaddr; /* 1024*1024 bytes used for storing uploaded samples (+32 additional bytes for read padding) */ + uint8_t *gusdatapos; /* (gusdataend-gusdata) bytes used for storing emulated GF1/mixer register states (32*32+4 bytes in initial GUSemu32 version) */ uint32_t gusirq; uint32_t gusdma; unsigned int timer1fraction; @@ -92,7 +76,7 @@ void gus_dma_transferdata(GUSEmuState *state, char *dma_addr, unsigned int count /* If the interrupts are asynchronous, it may be needed to use a separate thread mixing into a temporary */ /* audio buffer in order to avoid quality loss caused by large numsamples and elapsed_time values. */ -void gus_mixvoices(GUSEmuState *state, unsigned int playback_freq, unsigned int numsamples, GUSsample *bufferpos); +void gus_mixvoices(GUSEmuState *state, unsigned int playback_freq, unsigned int numsamples, int16_t *bufferpos); /* recommended range: 10 < numsamples < 100 */ /* lower values may result in increased rounding error, higher values often cause audible timing delays */ |