Also Please correct your post and add code tags around your code.
There is a small pencil below your existing posts.
click on this pencil ➜ that will let you edit your post.
Select the part of the text that corresponds to the code
Click on the <code/> icon in the toolbar to indicate that it is code
click Save Edit
(Also make sure to properly indent the code in the IDE before copying and pasting it here. This can be done by pressing ctrlT on a PC or cmdT on a Mac)
so you did not tell the full story . When compiling the error message is
sketch_feb24a.ino:33:44: note: in expansion of macro 'ONLOW'
enum AudioState { IDLE, ONIDLE, ONVERYLOW, ONLOW, ONMID, ONHIGH }; // Pastikan tidak ada koma di akhir
^~~~~
sketch_feb24a:33:65: error: expected declaration before '}' token
The compiler is giving you a key information when it states "in expansion of macro 'ONLOW"
➜ it means ONLOW is defined somewhere else and probably the same applies to ONHIGH
try to change all your ONLOW and ONHIGH in the code to something else like