From e282227c6ab8045d517c93d502818b20a9c3baa7 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 18 Sep 2008 21:33:56 +0000 Subject: [PATCH] when just rendering at console, use DEFAULT_BUFFER_SIZE git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1629 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/mixer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp index d5998873c..178f19449 100644 --- a/src/core/mixer.cpp +++ b/src/core/mixer.cpp @@ -299,8 +299,14 @@ mixer::mixer( void ) : m_inputBuffer[i] = new sampleFrame[ DEFAULT_BUFFER_SIZE * 100 ]; clearAudioBuffer( m_inputBuffer[i], m_inputBufferSize[i] ); } - - if( configManager::inst()->value( "mixer", "framesperaudiobuffer" + + // just rendering? + if( !engine::hasGUI() ) + { + m_framesPerPeriod = DEFAULT_BUFFER_SIZE; + m_fifo = new fifo( 1 ); + } + else if( configManager::inst()->value( "mixer", "framesperaudiobuffer" ).toInt() >= 32 ) { m_framesPerPeriod = configManager::inst()->value( "mixer",