Skip to content

Commit

Permalink
avoiding division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
roymacdonald committed Nov 12, 2023
1 parent ea76e82 commit dd5f422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ofxSoundObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ofxSoundObject::ofxSoundObject(const ofxSoundObject& a): _bBypass(a._bBypass.loa
ofxSoundObject::ofxSoundObject()
:_bBypass(false)
{
ofLogWarning("ofxSoundObject::ofxSoundObject()", "the ofxSoundObjects' no args constructor should not be called. ");
ofLogWarning("ofxSoundObject::ofxSoundObject()") << "the ofxSoundObjects' no args constructor should not be called. ";
}
ofxSoundObject::ofxSoundObject(ofxSoundObjectsType t)
:_bBypass(false)
Expand Down
3 changes: 2 additions & 1 deletion src/ofxSoundUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ class ofxCircularSoundBuffer: public ofSoundBuffer{
if(size() == 0 || getNumChannels() == 0 || bNeedsAllocation.load()){//} || getNumFrames() != buffer.getNumFrames() * numBuffers){
allocate(srcSizePerChannel* numBuffers, numChannels);
setSampleRate(sampleRate);

if( getBuffer().size()){
bNeedsAllocation = false;
pushIndex %= getBuffer().size();
}
}
if(getBuffer().size() > 0){

Expand Down

0 comments on commit dd5f422

Please sign in to comment.