aboutsummaryrefslogtreecommitdiff
path: root/hw/sb16.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-09 23:09:44 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-09 23:09:44 +0000
commitfb065187e4ee9e0d1709b344ec01bb426ff1e43b (patch)
treeca7bf5ed6f0731429b9f9b6d62f2993583c9bcfb /hw/sb16.c
parentbf71c9d9b64a70e56db351c38ff71e5e27d871e7 (diff)
audio clean up (initial patch by malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1131 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sb16.c')
-rw-r--r--hw/sb16.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/hw/sb16.c b/hw/sb16.c
index d9320566ab..a94e6899e9 100644
--- a/hw/sb16.c
+++ b/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)