Skip to content

Commit

Permalink
Updated soundPlayer example
Browse files Browse the repository at this point in the history
  • Loading branch information
roymacdonald committed Jul 19, 2023
1 parent a8f50fb commit cb82302
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions example-soundPlayerObject/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ void ofApp::setup(){
// set if you want to either have the player looping (playing over and over again) or not (stop once it reaches the its end).
player.setLoop(true);

if(!player.getIsLooping()){
// if the player is not looping you can register to the end event, which will get triggered when the player reaches the end of the file.
playerEndListener = player.endEvent.newListener(this, &ofApp::playerEnded);
}
// the endEvent gets triggered when it reaches the end of the file, regardless of it being
// in looping or not
playerEndListener = player.endEvent.newListener(this, &ofApp::playerEnded);

}
//--------------------------------------------------------------
void ofApp::playerEnded(size_t & id){
Expand Down

0 comments on commit cb82302

Please sign in to comment.