mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 13:07:01 +00:00
added temporary option -enable-audio
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@768 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9d4fb82e3c
commit
aaaa7df625
2
hw/pc.c
2
hw/pc.c
@ -401,9 +401,11 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
|
|||||||
DMA_init();
|
DMA_init();
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
if (audio_enabled) {
|
||||||
/* no audio supported yet for win32 */
|
/* no audio supported yet for win32 */
|
||||||
AUD_init();
|
AUD_init();
|
||||||
SB16_init();
|
SB16_init();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
floppy_controller = fdctrl_init(6, 2, 0, 0x3f0, fd_table);
|
floppy_controller = fdctrl_init(6, 2, 0, 0x3f0, fd_table);
|
||||||
|
10
vl.c
10
vl.c
@ -111,6 +111,7 @@ NetDriverState nd_table[MAX_NICS];
|
|||||||
SerialState *serial_console;
|
SerialState *serial_console;
|
||||||
QEMUTimer *gui_timer;
|
QEMUTimer *gui_timer;
|
||||||
int vm_running;
|
int vm_running;
|
||||||
|
int audio_enabled = 0;
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
/* x86 io ports */
|
/* x86 io ports */
|
||||||
@ -1744,8 +1745,10 @@ int main_loop(void)
|
|||||||
qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
|
qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
|
||||||
qemu_get_clock(vm_clock));
|
qemu_get_clock(vm_clock));
|
||||||
|
|
||||||
|
if (audio_enabled) {
|
||||||
/* XXX: add explicit timer */
|
/* XXX: add explicit timer */
|
||||||
SB16_run();
|
SB16_run();
|
||||||
|
}
|
||||||
|
|
||||||
/* run dma transfers, if any */
|
/* run dma transfers, if any */
|
||||||
DMA_run();
|
DMA_run();
|
||||||
@ -1761,7 +1764,7 @@ int main_loop(void)
|
|||||||
|
|
||||||
void help(void)
|
void help(void)
|
||||||
{
|
{
|
||||||
printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003 Fabrice Bellard\n"
|
printf("QEMU PC emulator version " QEMU_VERSION ", Copyright (c) 2003-2004 Fabrice Bellard\n"
|
||||||
"usage: %s [options] [disk_image]\n"
|
"usage: %s [options] [disk_image]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
||||||
@ -1775,6 +1778,7 @@ void help(void)
|
|||||||
"-snapshot write to temporary files instead of disk image files\n"
|
"-snapshot write to temporary files instead of disk image files\n"
|
||||||
"-m megs set virtual RAM size to megs MB\n"
|
"-m megs set virtual RAM size to megs MB\n"
|
||||||
"-nographic disable graphical output and redirect serial I/Os to console\n"
|
"-nographic disable graphical output and redirect serial I/Os to console\n"
|
||||||
|
"-enable-audio enable audio support\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Network options:\n"
|
"Network options:\n"
|
||||||
"-nics n simulate 'n' network cards [default=1]\n"
|
"-nics n simulate 'n' network cards [default=1]\n"
|
||||||
@ -1842,6 +1846,7 @@ struct option long_options[] = {
|
|||||||
{ "macaddr", 1, NULL, 0 },
|
{ "macaddr", 1, NULL, 0 },
|
||||||
{ "user-net", 0, NULL, 0 },
|
{ "user-net", 0, NULL, 0 },
|
||||||
{ "dummy-net", 0, NULL, 0 },
|
{ "dummy-net", 0, NULL, 0 },
|
||||||
|
{ "enable-audio", 0, NULL, 0 },
|
||||||
{ NULL, 0, NULL, 0 },
|
{ NULL, 0, NULL, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2033,6 +2038,9 @@ int main(int argc, char **argv)
|
|||||||
case 19:
|
case 19:
|
||||||
net_if_type = NET_IF_DUMMY;
|
net_if_type = NET_IF_DUMMY;
|
||||||
break;
|
break;
|
||||||
|
case 20:
|
||||||
|
audio_enabled = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
2
vl.h
2
vl.h
@ -173,6 +173,8 @@ void qemu_del_vm_stop_handler(VMStopHandler *cb, void *opaque);
|
|||||||
void vm_start(void);
|
void vm_start(void);
|
||||||
void vm_stop(int reason);
|
void vm_stop(int reason);
|
||||||
|
|
||||||
|
extern int audio_enabled;
|
||||||
|
|
||||||
/* async I/O support */
|
/* async I/O support */
|
||||||
|
|
||||||
typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
|
typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
|
||||||
|
Loading…
Reference in New Issue
Block a user