5

I want to play a wave file from my CentOS 6.5 Vagrant box using aplay and of course I want to hear the sound.

This is what I do:

> aplay sine.wav
Playing WAVE 'sine.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

It seems aplay actually plays the file. But I don't hear the sine tone.

The same happens using speaker-test. It seems to work but I don't hear anything.

> speaker-test

speaker-test 1.0.23

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
Time per period = 2.618271
 0 - Front Left

This is my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "centos-6.5"

  config.vm.provider "virtualbox" do |v|
    v.memory = 2048
    v.cpus = 2
    v.customize [
      "modifyvm", :id,
      "--ioapic", "on",
      "--audio", "coreaudio",
      "--audiocontroller", "ac97"
    ]
  end
end

What is missing? What do I have to do to actually hear the audio output?

  • Uhhhhhh... Headphones/Speakers? – Questionmark Oct 23 '14 at 14:18
  • At least on Debian, sound is mute by default. If that is the same case on CentOS, add a provisioner that runs the following as root: alsactl init. – Teresa e Junior Mar 16 '17 at 23:10
  • Is your host a mac? – GnP Jan 12 '18 at 12:03
  • suggest add option '-c 2' to speaker-test and test both stereo channels. do you know what the default Playback device is? have you checked device is not muted or level turned down in alsamixer or amixer? – nik gnomic Mar 12 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.