mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
audio clean up (initial patch by malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1131 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
bf71c9d9b6
commit
fb065187e4
17 changed files with 337 additions and 333 deletions
20
hw/sb16.c
20
hw/sb16.c
|
@ -23,12 +23,16 @@
|
|||
*/
|
||||
#include "vl.h"
|
||||
|
||||
/* #define DEBUG */
|
||||
#define AUDIO_CAP "sb16"
|
||||
#include "audio/audio.h"
|
||||
|
||||
#define LENOFA(a) ((int) (sizeof(a)/sizeof(a[0])))
|
||||
|
||||
#define dolog(...) AUD_log ("sb16", __VA_ARGS__)
|
||||
#ifdef DEBUG
|
||||
#define ldebug(...) dolog (__VA_ARGS__)
|
||||
#else
|
||||
#define ldebug(...)
|
||||
#endif
|
||||
|
||||
/* #define DEBUG */
|
||||
/* #define DEBUG_SB16_MOST */
|
||||
|
||||
#define IO_READ_PROTO(name) \
|
||||
|
@ -511,7 +515,7 @@ static void command (SB16State *s, uint8_t cmd)
|
|||
return;
|
||||
|
||||
warn:
|
||||
dolog ("warning command %#x,%d is not trully understood yet\n",
|
||||
dolog ("warning: command %#x,%d is not trully understood yet\n",
|
||||
cmd, s->needed_bytes);
|
||||
s->cmd = cmd;
|
||||
return;
|
||||
|
@ -1172,8 +1176,10 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id)
|
|||
qemu_get_be32s (f, &s->mixer_nreg);
|
||||
qemu_get_buffer (f, s->mixer_regs, 256);
|
||||
|
||||
if (s->voice)
|
||||
AUD_reset (s->voice);
|
||||
if (s->voice) {
|
||||
AUD_close (s->voice);
|
||||
s->voice = NULL;
|
||||
}
|
||||
|
||||
if (s->dma_running) {
|
||||
if (s->freq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue