macOS上的AudioKit:获取/设置系统设备音量 [英] AudioKit on macOS: get/set system device volume

查看:61
本文介绍了macOS上的AudioKit:获取/设置系统设备音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了

I've used AudioKit.inputDevice, Audiotkit.outputDevice, and friends to get get all input and output devices on my Mac, and to get/set default input and output device.

我希望阅读这些设备的当前音量,并能够自己进行设置,但是我找不到正确的AudioKit API.

I wish to read the current volume of these devices, and to be able to set it myself, but I can't find the correct AudioKit API for doing so.

有人知道该怎么做吗?

推荐答案

您将要使用类似于的库https://github.com/InerziaSoft/ISSoundAdditions

更改音量变得如此简单

[NSSound setSystemVolume:0.5]

-重复项:在Mac上以编程方式更改音量

这篇关于macOS上的AudioKit:获取/设置系统设备音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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