From 425bc1c25bd676e3ed52f92434cb44643f83da45 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 25 Oct 2022 01:37:31 +0200 Subject: Move the `main()` function to a new example file --- SSVLSystemAlertVolume.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'SSVLSystemAlertVolume.c') diff --git a/SSVLSystemAlertVolume.c b/SSVLSystemAlertVolume.c index b425bf8..9435f05 100644 --- a/SSVLSystemAlertVolume.c +++ b/SSVLSystemAlertVolume.c @@ -36,27 +36,3 @@ OSStatus SSVLSetSystemVolume(Float32 volume) { &volume ); } - -int main() { - OSStatus result; - - Float32 volume; - - result = system_volume_get(&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 = system_volume_set(new_volume); - if (result != noErr) { - printf("Error setting system volume: %d\n", result); - return 1; - } - - printf("Set volume to: %f\n", new_volume); -} -- cgit v1.2.3