Array of sounds

Hi, I am really hoping that I am not being a total dumbass here, I am very new to programming…

I am trying to set up an array of sounds like this…

ofSoundPlayer soundArray [6] = {percussion, bubbles, hats, drums, synthMel, synthLead};  
 for (int i=0; i<numSongs; i++) {  

I am loading all the sounds at the start but when I run the app nothing plays. If I load and play them individually it is fine so it’s definately a problem with the array.

Any help much appreciated :?

Where did you load the soundfiles?

for (int i=0; i<numSongs; i++) {

Maybe, if you do a loop like this, it could work…


Hey, thanks for your reply, I load all the sounds individually as follows:

    hats.loadSound("sounds/Hats & Shakers.mp3");  
    synthMel.loadSound("sounds/Synth Melody.mp3");  
    synthLead.loadSound("sounds/Synth Lead.mp3");  

If I set them to play individually it works but if I try to put them in an array and access them that way it doesn’t :?