From cdf455726b34de60604f3ad7f94ca255b50e358d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 25 Oct 2022 01:30:11 +0200 Subject: 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. --- system_alert_volume.c | 6 +++--- 1 file 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 -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( -- cgit v1.2.3