Adding sound to my application

Hi! I have been trying hard to add sound(mp3 format file) to my kinect based application, but it isn’t working. I basically want the processing of frames to pause during the time the sound is being played and then resume later on. I have tried using ofxScreenManager, waitkey command and even threads, but nothing seems to work. Could you please suggest me something useful? Thanks in advance!

You want to pause your kinect processing while the sound is playing?

I think you should be able to do something simple like this:

ofSoundPlayer mySound;
mySound.load("beat.mp3");

void ofApp::update(){
    if(some trigger from kinect){
        mySound.play();
    }
    
    if(!mySound.getIsPlaying()){
       //update your kinect here, this will only be called while the sound is not playing
}

Thank you so much! It worked!