Skip to content

Commit

Permalink
fix in osc message /sharedsampler/index/play, cannow take param 0|1 t…
Browse files Browse the repository at this point in the history
…o fix the playback behaviour
  • Loading branch information
jamet committed Jul 28, 2015
1 parent af77381 commit c2aef95
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/parseOSC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@ void ofApp::parseOsc()
}
// /sharedsampler/0/play
if (splittedAdress[2]=="play"){
sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer = !sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer;
if ( m.getNumArgs() == 0 ){
sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer = !sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer;
}
else{
int osc_playany = m.getArgAsInt32(0);
if ( osc_playany == 0){
sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer = false;
}
else{
sharedSampler[sharedSamplerIndex]->bPlayAnyBuffer = true;
}

}

}
// /sharedsampler/0/pause
if (splittedAdress[2]=="pause"){
Expand Down

0 comments on commit c2aef95

Please sign in to comment.