From dbef0b21a90f23477371066f7dcdc7056d8a3371 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 22 Oct 2013 03:58:56 +1000 Subject: [PATCH] Fix #2 for Qt Audio. Increase samples as it seems to sound much better. --- base/QtMain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/QtMain.h b/base/QtMain.h index cf88bb9219..b3509a874c 100644 --- a/base/QtMain.h +++ b/base/QtMain.h @@ -179,7 +179,7 @@ private: // Audio #define AUDIO_FREQ 44100 #define AUDIO_CHANNELS 2 -#define AUDIO_SAMPLES 1024 +#define AUDIO_SAMPLES 2048 #define AUDIO_SAMPLESIZE 16 class MainAudio: public QObject { @@ -192,7 +192,7 @@ public: fmt.setChannelCount(AUDIO_CHANNELS); fmt.setSampleSize(AUDIO_SAMPLESIZE); fmt.setByteOrder(QAudioFormat::LittleEndian); - fmt.setSampleType(QAudioFormat::Float); + fmt.setSampleType(QAudioFormat::SignedInt); mixlen = 4*AUDIO_CHANNELS*AUDIO_SAMPLES; mixbuf = (char*)malloc(mixlen); output = new QAudioOutput(fmt);