Ambient ceiling lighting project for Dolby 5.1 sound for PC

I'm sure it's not formatted correctly and may not compile.. It was to get my thought process across.. I never programmed in c before and I'm trying