[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to use coreaudio on a MacOS host
From: |
John Siu |
Subject: |
How to use coreaudio on a MacOS host |
Date: |
Wed, 15 Jan 2020 01:46:29 -0500 |
I use following to install Ubuntu 18.04 desktop successfully:-
IMG_CD=$HOME/Downloads/iso/ubuntu-18.04.3-desktop-amd64.iso
IMG_FILE=$HOME/code/vm/qemu/u64d01.qcow2
MAC_ADDR=xx:xx:xx:xx:xx:xx
qemu-system-x86_64 \
-no-user-config -nodefaults \
-show-cursor \
-name u64d01 \
-M q35,accel=hvf,usb=off,vmport=off \
-cpu host -smp 4 -m 2048 \
-overcommit mem-lock=off \
-overcommit cpu-pm=off \
-rtc base=utc,clock=host \
\
-device virtio-tablet-pci \
-device virtio-vga \
\
-device virtio-blk-pci,drive=ssd1 \
-drive id=ssd1,file=$IMG_FILE,if=none,format=qcow2 \
\
-device virtio-net-pci,netdev=nic1,mac=$MAC_ADDR \
-netdev user,id=nic1,ipv4=on,ipv6=on,hostname=u64d01,hostfwd=tcp::2222-:22 \
\
-device ich9-intel-hda,id=snd,msi=on \
-device hda-output,id=snd-codec0,bus=snd.0,cad=0,audiodev=snd0 \
-audiodev coreaudio,id=snd0,out.buffer-count=10000 \
\
-cdrom $IMG_CD
Removing the last cdrom line Ubuntu desktop boot up and everything
work perfectly except the audio.
Then I test wav audio driver, which save the client audio to a wave
file, like below and it work perfectly:
IMG_FILE=$HOME/code/vm/qemu/u64d01.qcow2
WAV_FILE=$HOME/qemu.wav
rm $WAV_FILE
qemu-system-x86_64 \
-no-user-config -nodefaults \
-show-cursor \
-name u64d01 \
-M q35,accel=hvf,usb=off,vmport=off \
-cpu host -smp 4 -m 2048 \
-overcommit mem-lock=off \
-overcommit cpu-pm=off \
-rtc base=utc,clock=host \
\
-device virtio-tablet-pci \
-device virtio-vga \
\
-device virtio-blk-pci,drive=ssd1 \
-drive id=ssd1,file=$IMG_FILE,if=none,format=qcow2 \
\
-device virtio-net-pci,netdev=nic1,mac=52:54:98:76:54:33 \
-netdev user,id=nic1,ipv4=on,ipv6=on,hostname=u64d01,hostfwd=tcp::2222-:22 \
\
-device ich9-intel-hda,id=snd,msi=on \
-device hda-output,id=snd-codec0,bus=snd.0,cad=0,audiodev=snd0 \
-audiodev wav,id=snd0,path=$WAV_FILE
I start the vm, open firefox and play a few audio, then shutdown the
vm. Then I can play the qemu.wav file and all the audio was recorded
there.
However, I can't get audio directly with coreaudio.
Anyone can help?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to use coreaudio on a MacOS host,
John Siu <=