diff options
author | Teddy Wing | 2022-10-25 01:30:11 +0200 |
---|---|---|
committer | Teddy Wing | 2022-10-25 01:30:11 +0200 |
commit | cdf455726b34de60604f3ad7f94ca255b50e358d (patch) | |
tree | 1c987bb824f6577ece4bd2ada63fd8011384c549 | |
parent | 9e23632b59c24a96f880f5958f28578cd45574c9 (diff) | |
download | SSVLSystemAlertVolume-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.
-rw-r--r-- | system_alert_volume.c | 6 |
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( |