Page 1 of 1

Added wav files

PostPosted: Sun Nov 10, 2024 2:11 pm
by Battwell
As standard uccnc only has one sound - reset.
After reading through some code posted on this forum I finally found out how to add extra sounds as wav files
Will add instructions as a reply to this post .
The wav file was made by converting from mp3 using vlc media player .

https://youtube.com/shorts/e24msgoznYw? ... vQzR-SyGkf

Re: Added wav files

PostPosted: Sun Nov 10, 2024 5:00 pm
by Battwell

Re: Added wav files

PostPosted: Sun Nov 10, 2024 5:22 pm
by Battwell
drop your chosen. wav file in your uccnc installed folder
uccnc/flashscreen/sound.

use the following line in your macro header:
System.Media.SoundPlayer errorSound = new System.Media.SoundPlayer(Application.StartupPath + @"\Flashscreen\SOUND\cartoon-trombone-sound-effect-241387.wav");
(change the name to whatever your wav file was saved as! )

start the sound in your macro using:
errorSound.Play();

convert mp3 files to.wav using vlc media player or similar. (vlc is free)
trim longer files or create your own using something like https://www.audacityteam.org/ (very powerful and free)