diddlesnaps / clouds

17 stars 3 forks source link

[Bug]: #9

Open lazzarello opened 2 years ago

lazzarello commented 2 years ago

What happened?

With these sound settings from the launch shell script, sound from the VM was audible but had an unstable clock, which both changed the speed of music playing with a regular tempo and produced frequent audible clicks.

    -device ich9-intel-hda,bus="pcie.0",addr="0x1b"  \
    -device hda-micro,audiodev=windows \
    -audiodev pa,id=windows,server="unix:/run/user/$(id -u)/pulse/native,out.frequency=48000" \

Using the same disk image for a VM created through virt-manager (both are backed by kvm/qemu) with the following setting played sound as I would expect.

<sound model="ich9">
  <alias name="sound0"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
</sound>

The only difference I could see is when the qemu "pulse native" device connects to the pulse graph, its buffer size is much lower (about 4x lower) when played out of the same sound device as the virt-manager buffer (which is about 4300 samples, so pretty long). I do not know how to control this value and it seems virt-manager just has a different default? I'm not really sure.

What should have happened?

The virtual audio device from clouds qemu device should play sound the same way as the virt-manger audio device. Both are backed by the same pulseaudio server.

Output of snap info clouds

lee@wendy:~$ snap info clouds
name:      clouds
summary:   Download and install Windows in a VM
publisher: Daniel Llewellyn (diddledani)
store-url: https://snapcraft.io/clouds
contact:   https://github.com/diddlesnaps/clouds/issues
license:   unset
description: |
  Launch clouds from the terminal to monitor initial launch setup, although it should be smooth
  sailing. Subsequent launches can be done via the desktop icon. Clouds will prompt you for either
  Windows 10 or 11, then ask for a locale, and will download the ISO for that locale and install it
  automatically.

  This will boot to the Windows setup.

  Notes:

  - Does not contain Windows, but downloads an installer image
  - Initially launches with VM memory set to 4GiB for compatibility with Windows 11 minimum
  requirements
  - Uses an editable launch script in ~/snap/clouds/common/launch
  - May be slow
  - Patches welcome :)
commands:
  - clouds
  - clouds.mid
  - clouds.mp3
snap-id:      5sTqSTu8Oj8VOeLa0vqludrUmP5nKVsq
tracking:     latest/stable
refresh-date: today at 14:19 PDT
channels:
  latest/stable:    0.666 2021-10-05 (39) 332MB -
  latest/candidate: ↑                           
  latest/beta:      ↑                           
  latest/edge:      0.666 2021-10-05 (39) 332MB -
installed:          0.666            (39) 332MB -

Output of snap connections clouds

lee@wendy:~$ snap connections clouds
Interface                 Plug                           Slot                             Notes
audio-playback            clouds:audio-playback          :audio-playback                  -
audio-record              clouds:audio-record            -                                -
content[gnome-3-38-2004]  clouds:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     clouds:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      clouds:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     clouds:sound-themes            gtk-common-themes:sound-themes   -
desktop                   clouds:desktop                 :desktop                         -
desktop-legacy            clouds:desktop-legacy          :desktop-legacy                  -
gsettings                 clouds:gsettings               :gsettings                       -
home                      clouds:home                    :home                            -
kvm                       clouds:kvm                     :kvm                             -
network                   clouds:network                 :network                         -
network-bind              clouds:network-bind            :network-bind                    -
network-control           clouds:network-control         -                                -
opengl                    clouds:opengl                  :opengl                          -
raw-usb                   clouds:raw-usb                 -                                -
removable-media           clouds:removable-media         -                                -
screen-inhibit-control    clouds:screen-inhibit-control  :screen-inhibit-control          -
unity7                    clouds:unity7                  :unity7                          -
wayland                   clouds:wayland                 :wayland                         -
x11                       clouds:x11                     :x11                             -

Output of snap version

lee@wendy:~$ snap version
snap    2.52
snapd   2.52
series  16
ubuntu  21.04
kernel  5.11.0-37-lowlatency

Relevant log output

No response

Teminal output of app

No response

lucyllewy commented 2 years ago

Hi,

I've just released a new version to the stable channel. Can I request that you update, move your modified launch script aside so that the snap copies a new one over and try running the vm again to see if the audio issues are fixed?