为什么我听不到 CentOS 6.5 Vagrant 盒子中播放的音频?

为什么我听不到 CentOS 6.5 Vagrant 盒子中播放的音频?

我想使用 aplay 从我的 CentOS 6.5 Vagrant 盒子中播放波形文件,当然我想听到声音。

这就是我所做的:

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

看起来 aplay 确实播放了该文件。但我听不到正弦音。

使用扬声器测试也会发生同样的情况。它似乎有效,但我什么也没听到。

> 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

这是我的 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

缺什么?我需要做什么才能真正听到音频输出?

相关内容