最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】VirtualBox中安装了Mac,但是没有声音

Mac crifan 8921浏览 0评论

【问题】

VirtualBox中安装了Mac后,也已经实现了Mac和Win7之间共享了,所以通过smb可以看到Win7中的MP3文件了,然后用iTunes打开,结果可以播放,但是却没声音。

【解决过程】

1.从vbox装Mac 雪豹没有声音啊中知道了

VirtualBox ICH AC97 Audio Driver 和VirtualBoxICHAC97DriverOSX

2.去搜VirtualBox ICH AC97 Audio Driver,找到了Mac OS X guest sound support driver UPDATE [See Attachment]注:其中也给出了apple官网的链接,里面有很多开源驱动,包括audio

http://www.opensource.apple.com/source/AppleAC97Audio/AppleAC97Audio-5/

3.然后通过VirtualBox中的Mac中的Safari打开该地址,下载了对应的(经过人家专门为x64而修改后的版本的音频驱动源码)AppleAC97Audio-5-x86-64_sources.zip

downloaded AppleAC97Audio-x86-64_souces

然后双击AppleAC97Audio.xcodeproj后,自动调用Xcode打开,然后点击Run去编辑,结果出错:

run fail

4.网上看了一堆的相关帖子,还是没搞懂如何解决。

后来参考:Missing audio support in 64 bits Windows Vista and 7 guests,而且,我也查看了我当前的win7下的声卡是High Definition Audio Device,所以去把虚拟机mac的声卡改为Intel HD Audio试试.

5.不过顺带倒是看到了个帖子是关于如何修改默认分辨率的:

Changing Default Resolution In Mac OS X Virtual Machine

有空可以去试试。

6.对于上面xcode项目编译出现的警告,看了下警告,发现是版本不匹配,项目设置中的:

Deployment是10.5

Deployment_SL是10.6

此处都去改为当前的Lion,即10.7:

change 10.5 an d 10.6 to 10.7

最后还剩下一个警告和一个错误:

still 1 warning 1 error

经过一番折腾,最后是把整个项目默认配置中的Base SDK改为10.7,然后就可以正常编译了:

change proj to 10.7

但成功编译后,想要找到编译后的文件,却找了半天也没找到,也去看了原先的源码,下面没有找到build文件夹。

接着点击Xcode->Organizer->Project,结果却死掉了。

然后强制关闭虚拟机Mac。

重启Mac前,又把声卡改为:

主机音频驱动:Windows DirectSound

控制芯片:Intel HD 音频

interl hd

然后启动Mac后,竟然声音就好了。

因为去系统偏好设置中的声音,改变声音大小,双击那个可以拖动的小条,就可以听到声音的:

double click can hear sound

然后再去通过smb打开Win7下的MP3,果然可以听到声音了:

iTunes can play mp3

注:

关于VirtualBox中的声卡设置,摘录手册中的解释如下:

3.7. Audio settings

The "Audio" section in a virtual machine’s Settings window determines whether the VM will see a sound card connected, and whether the audio output should be heard on the host system.

If audio is enabled for a guest, you can choose between the emulation of an Intel AC’97 controller, an Intel HD Audio controller[15] or a SoundBlaster 16 card. In any case, you can select what audio driver VirtualBox will use on the host.

On a Linux host, depending on your host configuration, you can also select between the OSS, ALSA or the PulseAudio subsystem. On newer Linux distributions (Fedora 8 and above, Ubuntu 8.04 and above) the PulseAudio subsystem should be preferred.


[15] Intel HD Audio support was added with VirtualBox 4.0 because Windows 7 (32-bit and 64-bit versions) as well as 64-bit Windows Vista do not support the Intel AC’97 controller.

所以,无论如何,既然win7不支持Intel AC97此处不应该选择AC97,而应该选Intel HD才对。

 

【总结】

最后声卡可以正常使用,可以在Mac中听到声音了,好像是之前声卡设置不正确所导致的。

因为首先我此处的Host是Win7,其声卡是High Definition Audio Device

所以,VirtualBox中的Mac虚拟机的声卡,(好像)应该设置为Intel HD 音频才对

然后后来是通过Xcode编译了人家修改后的x64的版本的音频驱动,不知道是不是编译后,自动给安装了对应的kext?

不清楚,反正目前为止,是有声音了。

其他的,有空再折腾。

转载请注明:在路上 » 【已解决】VirtualBox中安装了Mac,但是没有声音

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.165 seconds, using 22.06MB memory