Browse files

fix #22799: crash on startup on mac osx

  • Loading branch information...
1 parent df3b4a2 commit 429b740e8fcb412b4c161b9f496e8425ad9c0514 @lasconic lasconic committed Sep 24, 2013
Showing with 4 additions and 1 deletion.
  1. +3 −0 synthesizer/msynthesizer.cpp
  2. +1 −1 synthesizer/msynthesizer.h
View
3 synthesizer/msynthesizer.cpp
@@ -273,6 +273,9 @@ void MasterSynthesizer::process(unsigned n, float* p)
lock1 = false;
return;
}
+ // avoid overflow
+ if( n > MAX_BUFFERSIZE / 2)
+ return;
for (Synthesizer* s : _synthesizer) {
if (s->active())
s->process(n, p, effect1Buffer, effect2Buffer);
View
2 synthesizer/msynthesizer.h
@@ -37,7 +37,7 @@ class MasterSynthesizer : public QObject {
double _masterTuning;
public:
- static const int MAX_BUFFERSIZE = 4096;
+ static const int MAX_BUFFERSIZE = 8192;
static const int MAX_EFFECTS = 2;
private:

0 comments on commit 429b740

Please sign in to comment.