Nothing obvious in there that causes sounds. The very short variable names are not helping with any understanding of what it's supposed to do when skimming the code. Some really odd constructions, especially around that installed[] array.
I'd try by disconnecting everything, letting just the code run. See what happens. No sounds? Connect the inputs one by one and trigger them. See what happens. Still no sounds? Continue with the outputs.
Then when you have the thing that triggers the sound, disconnect everything else and see if it persists. It may be a combination of things.