MSVC: Various fixes
* CMake * Compiler flags fixes * Don't strip * Fix default template argument errors * Fix VLAs. MSVC doesn't support C99, so Variable-Length-Arrays are not available. Use QVarLengthArray instead.
This commit is contained in:
@@ -40,7 +40,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
|
||||
m_filter1Model( this, tr( "Filter 1 type" ) ),
|
||||
m_cut1Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
|
||||
|
||||
m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),
|
||||
@@ -48,7 +48,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
|
||||
m_filter2Model( this, tr( "Filter 2 type" ) ),
|
||||
m_cut2Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
|
||||
{
|
||||
m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "LadspaEffect.h"
|
||||
@@ -141,12 +142,12 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
int frames = _frames;
|
||||
sampleFrame * o_buf = NULL;
|
||||
sampleFrame sBuf [_frames];
|
||||
QVarLengthArray<sample_t> sBuf(_frames * DEFAULT_CHANNELS);
|
||||
|
||||
if( m_maxSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
o_buf = _buf;
|
||||
_buf = &sBuf[0];
|
||||
_buf = reinterpret_cast<sampleFrame*>(sBuf.data());
|
||||
sampleDown( o_buf, _buf, m_maxSampleRate );
|
||||
frames = _frames * m_maxSampleRate /
|
||||
Engine::mixer()->processingSampleRate();
|
||||
|
||||
@@ -102,7 +102,7 @@ void MultitapEchoControls::setDefaultAmpShape()
|
||||
{
|
||||
const int length = m_steps.value();
|
||||
|
||||
float samples [length];
|
||||
QVarLengthArray<float> samples(length);
|
||||
for( int i = 0; i < length; ++i )
|
||||
{
|
||||
samples[i] = 0.0f;
|
||||
@@ -116,7 +116,7 @@ void MultitapEchoControls::setDefaultLpShape()
|
||||
{
|
||||
const int length = m_steps.value();
|
||||
|
||||
float samples [length];
|
||||
QVarLengthArray<float> samples(length);
|
||||
for( int i = 0; i < length; ++i )
|
||||
{
|
||||
samples[i] = 3.0f;
|
||||
|
||||
@@ -2,7 +2,7 @@ INCLUDE(BuildPlugin)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_sc_andor -Dexprtk_disable_return_statement -Dexprtk_disable_break_continue -Dexprtk_disable_comments -Dexprtk_disable_string_capabilities -Dexprtk_disable_rtl_io_file -Dexprtk_disable_rtl_vecops ${WERROR_FLAGS} -fexceptions")
|
||||
|
||||
IF(WIN32)
|
||||
IF(WIN32 AND NOT MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features")
|
||||
ENDIF()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user