Support Sf2 Player, Mallets, PortAudio, and Lame with MSVC (#6507)
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
if(LMMS_HAVE_FLUIDSYNTH)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${FLUIDSYNTH_INCLUDE_DIRS} ${SAMPLERATE_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${FLUIDSYNTH_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${FLUIDSYNTH_LIBRARIES} ${SAMPLERATE_LIBRARIES})
|
||||
BUILD_PLUGIN(sf2player Sf2Player.cpp Sf2Player.h PatchesDialog.cpp PatchesDialog.h PatchesDialog.ui MOCFILES Sf2Player.h PatchesDialog.h UICFILES PatchesDialog.ui EMBEDDED_RESOURCES *.png)
|
||||
endif(LMMS_HAVE_FLUIDSYNTH)
|
||||
|
||||
include(BuildPlugin)
|
||||
include_directories(${SAMPLERATE_INCLUDE_DIRS})
|
||||
link_directories(${SAMPLERATE_LIBRARY_DIRS})
|
||||
link_libraries(${SAMPLERATE_LIBRARIES})
|
||||
build_plugin(sf2player
|
||||
Sf2Player.cpp Sf2Player.h PatchesDialog.cpp PatchesDialog.h PatchesDialog.ui
|
||||
MOCFILES Sf2Player.h PatchesDialog.h
|
||||
UICFILES PatchesDialog.ui
|
||||
EMBEDDED_RESOURCES *.png
|
||||
)
|
||||
target_link_libraries(sf2player fluidsynth)
|
||||
endif()
|
||||
|
||||
@@ -282,7 +282,7 @@ void Sf2Instrument::loadFile( const QString & _file )
|
||||
fluid_preset_t preset;
|
||||
fluid_preset_t *pCurPreset = &preset;
|
||||
#else
|
||||
fluid_preset_t *pCurPreset;
|
||||
fluid_preset_t *pCurPreset = nullptr;
|
||||
#endif
|
||||
|
||||
if ( ( pCurPreset = fluid_sfont_iteration_next_wrapper( pSoundFont, pCurPreset ) ) ) {
|
||||
@@ -475,7 +475,7 @@ QString Sf2Instrument::getCurrentPatchName()
|
||||
fluid_preset_t preset;
|
||||
fluid_preset_t *pCurPreset = &preset;
|
||||
#else
|
||||
fluid_preset_t *pCurPreset;
|
||||
fluid_preset_t *pCurPreset = nullptr;
|
||||
#endif
|
||||
while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset)))
|
||||
{
|
||||
@@ -676,8 +676,13 @@ void Sf2Instrument::noteOn( Sf2PluginData * n )
|
||||
// get list of current voice IDs so we can easily spot the new
|
||||
// voice after the fluid_synth_noteon() call
|
||||
const int poly = fluid_synth_get_polyphony( m_synth );
|
||||
fluid_voice_t * voices[poly];
|
||||
#ifndef _MSC_VER
|
||||
fluid_voice_t* voices[poly];
|
||||
unsigned int id[poly];
|
||||
#else
|
||||
const auto voices = static_cast<fluid_voice_t**>(_alloca(poly * sizeof(fluid_voice_t*)));
|
||||
const auto id = static_cast<unsigned int*>(_alloca(poly * sizeof(unsigned int)));
|
||||
#endif
|
||||
fluid_synth_get_voicelist( m_synth, voices, poly, -1 );
|
||||
for( int i = 0; i < poly; ++i )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES("${STK_INCLUDE_DIR}")
|
||||
LINK_LIBRARIES(${STK_LIBRARY})
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
||||
BUILD_PLUGIN(malletsstk Mallets.cpp Mallets.h MOCFILES Mallets.h EMBEDDED_RESOURCES artwork.png logo.png)
|
||||
include(BuildPlugin)
|
||||
build_plugin(malletsstk
|
||||
Mallets.cpp Mallets.h
|
||||
MOCFILES Mallets.h
|
||||
EMBEDDED_RESOURCES artwork.png logo.png
|
||||
)
|
||||
target_link_libraries(malletsstk unofficial::libstk::libstk)
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#include <QDomElement>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "BandedWG.h"
|
||||
#include "ModalBar.h"
|
||||
#include "TubeBell.h"
|
||||
#include <stk/BandedWG.h>
|
||||
#include <stk/ModalBar.h>
|
||||
#include <stk/TubeBell.h>
|
||||
|
||||
#include "AudioEngine.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef _MALLET_H
|
||||
#define _MALLET_H
|
||||
|
||||
#include "Instrmnt.h"
|
||||
#include <stk/Instrmnt.h>
|
||||
|
||||
#include "ComboBox.h"
|
||||
#include "Instrument.h"
|
||||
|
||||
Reference in New Issue
Block a user