diff --git a/base/QtMain.h b/base/QtMain.h index b4ade8a40e..a6f7badc97 100644 --- a/base/QtMain.h +++ b/base/QtMain.h @@ -233,10 +233,10 @@ public slots: fmt.setSampleSize(AUDIO_SAMPLESIZE); fmt.setByteOrder(QAudioFormat::LittleEndian); fmt.setSampleType(QAudioFormat::SignedInt); - mixlen = 5*2*AUDIO_CHANNELS*AUDIO_SAMPLES; + mixlen = 2*AUDIO_CHANNELS*AUDIO_SAMPLES; mixbuf = (char*)malloc(mixlen); output = new QAudioOutput(fmt); - output->setBufferSize(mixlen); + output->setBufferSize(mixlen*10); feed = output->start(); if (feed != NULL) timer = startTimer(1000*AUDIO_SAMPLES / AUDIO_FREQ); @@ -245,7 +245,7 @@ public slots: protected: void timerEvent(QTimerEvent *) { memset(mixbuf, 0, mixlen); - size_t frames = NativeMix((short *)mixbuf, 5*AUDIO_SAMPLES); + size_t frames = NativeMix((short *)mixbuf, AUDIO_SAMPLES); if (frames > 0) feed->write(mixbuf, sizeof(short) * 2 * frames); } diff --git a/ext/libzip/mkstemp.c b/ext/libzip/mkstemp.c index ba270cf49f..62641f0af3 100644 --- a/ext/libzip/mkstemp.c +++ b/ext/libzip/mkstemp.c @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include "config.h" #ifndef HAVE_MKSTEMP #include #include