有没有办法以编程方式使OSX上的声音静音? [英] Is there a way to programmatically mute the sound on OSX?

查看:74
本文介绍了有没有办法以编程方式使OSX上的声音静音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过编程方式使OSX上的声音静音而不使用私有API并以Mac App Store接受的方式.

Is there a way to programmatically mute the sound on OSX without using private APIs and in a way that is accepted by the Mac App Store.

推荐答案

对于MAC OS X: 本教程可能会有所帮助.

对于IOS:

静音"是系统范围的设置.因此,对于使用官方SDK开发的应用程序,不能更改(在大多数情况下甚至不能访问)系统范围的设置.

Sound Mute is a system-wide setting. So for applications developed using the official SDK cannot change (and in most cases cannot even access) system-wide settings.

从技术上讲,可以通过Celestial.framework中的私有AVSystemController类更改系统容量,但会阻止您的应用获得Apple的批准.

It is technically possible to change the system volume through the private AVSystemController class in Celestial.framework, but will prevent your app from getting Apple's approval.

这篇关于有没有办法以编程方式使OSX上的声音静音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆