Carla: fix MSVC compatibility
This commit is contained in:
@@ -333,8 +333,14 @@ void CarlaInstrument::play(sampleFrame* workingBuffer)
|
||||
fTimeInfo.bbt.ticksPerBeat = ticksPerBeat;
|
||||
fTimeInfo.bbt.beatsPerMinute = s->getTempo();
|
||||
|
||||
#ifndef _MSC_VER
|
||||
float buf1[bufsize];
|
||||
float buf2[bufsize];
|
||||
#else
|
||||
float *buf1 = static_cast<float *>(_alloca(bufsize * sizeof(float)));
|
||||
float *buf2 = static_cast<float *>(_alloca(bufsize * sizeof(float)));
|
||||
#endif
|
||||
|
||||
float* rBuf[] = { buf1, buf2 };
|
||||
std::memset(buf1, 0, sizeof(float)*bufsize);
|
||||
std::memset(buf2, 0, sizeof(float)*bufsize);
|
||||
|
||||
Reference in New Issue
Block a user