Set up alsa on vagrant
Should work on linux and macos, I only tested osx and was able to hear sound coming out of it using mpg123 on the command line. LibreTime probably still needs some fixes to make this work as intended.
This commit is contained in:
parent
bd2f96acf2
commit
13c676a886
|
@ -15,8 +15,29 @@ Vagrant.configure("2") do |config|
|
|||
config.vm.provider "virtualbox" do |v|
|
||||
# to run without OOMing we need at least 1GB of RAM
|
||||
v.memory = 1024
|
||||
|
||||
# enable audio drivers on VM settings
|
||||
# pinched from https://github.com/GeoffreyPlitt/vagrant-audio
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
vb.customize ["modifyvm", :id, '--audio', 'coreaudio', '--audiocontroller', 'hda'] # choices: hda sb16 ac97
|
||||
elsif RUBY_PLATFORM =~ /mingw|mswin|bccwin|cygwin|emx/
|
||||
vb.customize ["modifyvm", :id, '--audio', 'dsound', '--audiocontroller', 'ac97']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# ubuntu/trusty64 alsa setup
|
||||
# slightly modernized from https://github.com/naomiaro/vagrant-alsa-audio
|
||||
# https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
alsa_deb="oem-audio-hda-daily-dkms_0.201703070301~ubuntu14.04.1_all.deb"
|
||||
wget -nv https://code.launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily/+files/${alsa_deb}
|
||||
sudo dpkg -i ${alsa_deb}
|
||||
rm ${alsa_deb}
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -m --force-yes install alsa
|
||||
sudo usermod -a -G audio vagrant
|
||||
SHELL
|
||||
config.vm.provision "shell", inline: "cd /vagrant; ./install -fIapv --web-port=9080"
|
||||
config.vm.provision "shell", path: "docs/scripts/install.sh"
|
||||
config.vm.provision "shell", path: "docs/scripts/serve.sh"
|
||||
|
|
Loading…
Reference in New Issue