-
Notifications
You must be signed in to change notification settings - Fork 8
/
Vagrantfile
41 lines (34 loc) · 1.41 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Vagrant.configure("2") do |config|
config.ssh.forward_x11 = true # useful since some audio testing programs use x11
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, :inline => $BOOTSTRAP_SCRIPT # see below
# enable audio drivers on VM settings
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
$BOOTSTRAP_SCRIPT = <<EOF
set -e # Stop on any error
# --------------- SETTINGS ----------------
# Other settings
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
# ---- OSS AUDIO
sudo usermod -a -G audio vagrant
sudo apt-get install -y oss4-base oss4-dkms oss4-source oss4-gtk linux-headers-3.2.0-23 debconf-utils
sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/source || echo ALREADY SYMLINKED
sudo module-assistant prepare
sudo module-assistant auto-install -i oss4 # this can take 2 minutes
sudo debconf-set-selections <<< "linux-sound-base linux-sound-base/sound_system select OSS"
echo READY.
# have to reboot for drivers to kick in, but only the first time of course
if [ ! -f ~/runonce ]
then
sudo reboot
touch ~/runonce
fi
EOF