Skip to content

Commit

Permalink
fix #22799: crash on startup on mac osx
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Sep 24, 2013
1 parent df3b4a2 commit 429b740
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions synthesizer/msynthesizer.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion synthesizer/msynthesizer.h
Expand Up @@ -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:
Expand Down

0 comments on commit 429b740

Please sign in to comment.