git: 0789c3bd2c45 - main - share/examples/sound: Fix spelling "controller"

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Tue, 13 Feb 2024 06:22:25 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=0789c3bd2c4597e40b1d2556d21bfd10ff628a0a

commit 0789c3bd2c4597e40b1d2556d21bfd10ff628a0a
Author:     Assume-Zhan <assume0701@gapp.nthu.edu.tw>
AuthorDate: 2024-01-05 04:13:58 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2024-02-13 06:18:04 +0000

    share/examples/sound: Fix spelling "controller"
    
    Event:          Advanced UNIX Programming Course (Fall’23) at NTHU.
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/994
---
 share/examples/sound/midi.c    | 4 ++--
 share/examples/sound/ossmidi.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/share/examples/sound/midi.c b/share/examples/sound/midi.c
index 7149bcb31c82..6d6ac9aa0fcd 100644
--- a/share/examples/sound/midi.c
+++ b/share/examples/sound/midi.c
@@ -49,7 +49,7 @@ main()
 		switch (event.type) {
 		case NOTE_ON:
 		case NOTE_OFF:
-		case CONTROLER_ON:
+		case CONTROLLER_ON:
 			if ((l = read(midi_config.fd, &(event.note), sizeof(event.note))) == -1) {
 				perror("Error reading MIDI note");
 				exit(1);
@@ -65,7 +65,7 @@ main()
 		case NOTE_OFF:
 			printf("Channel %d, note %d, velocity %d\n", event.channel, event.note, event.velocity);
 			break;
-		case CONTROLER_ON:
+		case CONTROLLER_ON:
 			printf("Channel %d, controller %d, value %d\n", event.channel, event.controller, event.value);
 			break;
 		default:
diff --git a/share/examples/sound/ossmidi.h b/share/examples/sound/ossmidi.h
index 60bf5e41173e..99a6bacffe73 100644
--- a/share/examples/sound/ossmidi.h
+++ b/share/examples/sound/ossmidi.h
@@ -33,7 +33,7 @@
 #define NOTE_ON 0x90
 #define NOTE_OFF 0x80
 #define CHANNEL_MASK 0xF
-#define CONTROLER_ON 0xB0
+#define CONTROLLER_ON 0xB0
 
 typedef struct midi_event {
 	unsigned char type;