aboutsummaryrefslogtreecommitdiffstats
path: root/system_alert_volume.c
diff options
context:
space:
mode:
authorTeddy Wing2022-10-25 01:30:11 +0200
committerTeddy Wing2022-10-25 01:30:11 +0200
commitcdf455726b34de60604f3ad7f94ca255b50e358d (patch)
tree1c987bb824f6577ece4bd2ada63fd8011384c549 /system_alert_volume.c
parent9e23632b59c24a96f880f5958f28578cd45574c9 (diff)
downloadSSVLSystemAlertVolume-cdf455726b34de60604f3ad7f94ca255b50e358d.tar.bz2
Rename identifiers to align with Apple's guidelines for function naming
Following these guidelines for naming functions: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingFunctions.html#//apple_ref/doc/uid/20001283-BAJGGCAD and constants: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingIvarsAndTypes.html#//apple_ref/doc/uid/20001284-1001783 Chose the prefix "SSVL" as that's the `AudioServicesPropertyID` value.
Diffstat (limited to 'system_alert_volume.c')
-rw-r--r--system_alert_volume.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/system_alert_volume.c b/system_alert_volume.c
index c136a7b..a795568 100644
--- a/system_alert_volume.c
+++ b/system_alert_volume.c
@@ -1,8 +1,8 @@
#include <AudioToolbox/AudioToolbox.h>
-const AudioServicesPropertyID kAudioServicesPropertySystemAlertVolume = 'ssvl';
+const AudioServicesPropertyID SSVLAudioServicesPropertySystemAlertVolume = 'ssvl';
-OSStatus system_volume_get(Float32 *volume) {
+OSStatus SSVLGetSystemVolume(Float32 *volume) {
UInt32 volume_size = sizeof(*volume);
OSStatus result = AudioServicesGetProperty(
@@ -25,7 +25,7 @@ OSStatus system_volume_get(Float32 *volume) {
return result;
}
-OSStatus system_volume_set(Float32 volume) {
+OSStatus SSVLSetSystemVolume(Float32 volume) {
volume = exp(volume - 1.0);
return AudioServicesSetProperty(