#import <AudioToolbox/AudioServices.h>
#import <Foundation/Foundation.h>
#include "media.h"
Go to the source code of this file.
Definition at line 34 of file media_mac.m.
Referenced by main().
35 [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiatedAllowingIdleSystemSleep reason:@"Keyboard animation"];
Definition at line 5 of file media_mac.m.
References MUTED, UNKNOWN, and UNMUTED.
Referenced by KbPerf::applyIndicators().
7 AudioObjectPropertyAddress propertyAddress = {
8 kAudioHardwarePropertyDefaultOutputDevice,
9 kAudioObjectPropertyScopeGlobal,
10 kAudioObjectPropertyElementMaster
12 AudioDeviceID deviceID = 0;
13 UInt32 dataSize =
sizeof(deviceID);
14 if(AudioHardwareServiceGetPropertyData(kAudioObjectSystemObject, &propertyAddress, 0, NULL, &dataSize, &deviceID)
15 != kAudioHardwareNoError){
19 AudioObjectPropertyAddress propertyAddress2 = {
20 kAudioDevicePropertyMute,
21 kAudioDevicePropertyScopeOutput,
22 kAudioObjectPropertyElementMaster
24 if(!AudioHardwareServiceHasProperty(deviceID, &propertyAddress2))
27 dataSize =
sizeof(state);
28 if(AudioHardwareServiceGetPropertyData(deviceID, &propertyAddress2, 0, NULL, &dataSize, &state)
29 != kAudioHardwareNoError)