diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/.gitignore | 1 | ||||
| -rw-r--r-- | example/Makefile | 10 | ||||
| l--------- | example/lib/SSVLSystemAlertVolume.c | 1 | ||||
| l--------- | example/lib/SSVLSystemAlertVolume.h | 1 | ||||
| -rw-r--r-- | example/main.c | 6 | 
5 files changed, 17 insertions, 2 deletions
| diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..2d25c0f --- /dev/null +++ b/example/.gitignore @@ -0,0 +1 @@ +sysalertvol diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..26e8feb --- /dev/null +++ b/example/Makefile @@ -0,0 +1,10 @@ +PRODUCT := sysalertvol + +all: $(PRODUCT) + +$(PRODUCT): main.c lib/* +	$(CC) \ +		-framework AudioToolbox \ +		-framework CoreFoundation \ +		-o $@ \ +		main.c lib/SSVLSystemAlertVolume.c diff --git a/example/lib/SSVLSystemAlertVolume.c b/example/lib/SSVLSystemAlertVolume.c new file mode 120000 index 0000000..62c510b --- /dev/null +++ b/example/lib/SSVLSystemAlertVolume.c @@ -0,0 +1 @@ +../../SSVLSystemAlertVolume.c
\ No newline at end of file diff --git a/example/lib/SSVLSystemAlertVolume.h b/example/lib/SSVLSystemAlertVolume.h new file mode 120000 index 0000000..8156d78 --- /dev/null +++ b/example/lib/SSVLSystemAlertVolume.h @@ -0,0 +1 @@ +../../SSVLSystemAlertVolume.h
\ No newline at end of file diff --git a/example/main.c b/example/main.c index 327b88c..6a851fe 100644 --- a/example/main.c +++ b/example/main.c @@ -1,9 +1,11 @@ +#include "./lib/SSVLSystemAlertVolume.h" +  int main() {  	OSStatus result;  	Float32 volume; -	result = system_volume_get(&volume); +	result = SSVLGetSystemVolume(&volume);  	if (result != noErr) {  		printf("Error getting system volume: %d\n", result);  		return 1; @@ -13,7 +15,7 @@ int main() {  	Float32 new_volume = 0.5; -	result = system_volume_set(new_volume); +	result = SSVLSetSystemVolume(new_volume);  	if (result != noErr) {  		printf("Error setting system volume: %d\n", result);  		return 1; | 
