Skip to content

experimental branch - ofxSingleSoundPlayer - endEvent works only a few times #38

@stephanschulz

Description

@stephanschulz

With ofxSingleSoundPlayer and example-matrixMixer:

I added to ofApp.cc loadFolder()

//	     players[startIndex + i]->setLoop(true);
            players[startIndex + i]->setLoop(false);
            if(!players[startIndex + i]->isLooping()){
                ofAddListener(players[startIndex + i]->endEvent, this, &ofApp::playerEnded);
            }

and

void ofApp::playerEnded(size_t & id){
    ofLog()<<"playerEnded() "<<id;
    players[id]->play();
}

The endEvent gets called a couple of times for some of the players and eventually I hear some piping noise and

the app crashes

[notice ] playerEnded() 1
[notice ] playerEnded() 3
[notice ] playerEnded() 2
[notice ] playerEnded() 3
[notice ] playerEnded() 4

Screen Shot 2021-05-07 at 9 51 20 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions