blob: 6a851fe08bab42a97d6d4525153513bbddb1f532 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "./lib/SSVLSystemAlertVolume.h"
int main() {
OSStatus result;
Float32 volume;
result = SSVLGetSystemVolume(&volume);
if (result != noErr) {
printf("Error getting system volume: %d\n", result);
return 1;
}
printf("System volume: %f\n", volume);
Float32 new_volume = 0.5;
result = SSVLSetSystemVolume(new_volume);
if (result != noErr) {
printf("Error setting system volume: %d\n", result);
return 1;
}
printf("Set volume to: %f\n", new_volume);
}
|