Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Array of identical samples. Minim triggering sample issue.

$
0
0

Hi there. I have an array of identical samples for two bouncing orbs which are also in an array. A sample is to play each time a ball falls below a virtual water level. They trigger just fine, but there seems to be constant or random glitches in sample sounds at various other times when it has not crossed this threshold. The line in question where I set this threshold is contained within the orb_class. Perhaps this is completely wrong, but it triggers the samples at least:

  void playSample(int arrayIndex){ 
    if (orby < waterSurfaceHeight){   
      popsound[arrayIndex].rewind();
      popsound[arrayIndex].play();
    } 
  } 

*Edit. The code is shortened to relevant code only an is quoted in a reply below this one.


Viewing all articles
Browse latest Browse all 2896

Trending Articles