Merge branch 'stable-1.2'
# Conflicts: # cmake/modules/BuildPlugin.cmake # plugins/CMakeLists.txt # plugins/LadspaEffect/swh/CMakeLists.txt # plugins/LadspaEffect/tap/CMakeLists.txt # plugins/zynaddsubfx/zynaddsubfx # plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp # src/gui/MainWindow.cpp
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
SET(CMAKE_DEBUG_POSTFIX "")
|
||||
|
||||
# Enable C++11
|
||||
|
||||
@@ -8,13 +8,6 @@ ELSE()
|
||||
SET(PIC_FLAGS "-fPIC -DPIC")
|
||||
ENDIF()
|
||||
|
||||
# Additional link flags
|
||||
IF(LMMS_BUILD_WIN32 AND MINGW_PREFIX)
|
||||
SET(LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
|
||||
ELSEIF(LMMS_BUILD_APPLE)
|
||||
SET(LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
|
||||
ENDIF()
|
||||
|
||||
# Additional compile flags
|
||||
SET(COMPILE_FLAGS "${COMPILE_FLAGS} -O3 -Wall")
|
||||
SET(COMPILE_FLAGS "${COMPILE_FLAGS} -fomit-frame-pointer -funroll-loops -ffast-math -c -fno-strict-aliasing")
|
||||
@@ -44,6 +37,9 @@ FOREACH(_item ${XML_SOURCES})
|
||||
IF(NOT ("${_plugin}" STREQUAL "vocoder_1337"))
|
||||
TARGET_LINK_LIBRARIES("${_plugin}" -lfftw3f)
|
||||
ENDIF()
|
||||
IF(NOT MSVC)
|
||||
TARGET_LINK_LIBRARIES("${_plugin}" m)
|
||||
ENDIF()
|
||||
|
||||
SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
|
||||
|
||||
@@ -15,13 +15,8 @@ FOREACH(_item ${PLUGIN_SOURCES})
|
||||
IF(LMMS_BUILD_WIN32 AND NOT CMAKE_BUILD_TYPE MATCHES "Deb")
|
||||
ADD_CUSTOM_COMMAND(TARGET "${_plugin}" POST_BUILD COMMAND "${STRIP}" \"$<TARGET_FILE:${_plugin}>\")
|
||||
ENDIF()
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
|
||||
ELSEIF(NOT LMMS_BUILD_OPENBSD)
|
||||
SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
|
||||
ENDIF()
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_HAIKU)
|
||||
SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
||||
IF(NOT MSVC)
|
||||
TARGET_LINK_LIBRARIES("${_plugin}" m)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
#include <QDomDocument>
|
||||
#include <QDir>
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QProgressDialog>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "MidiImport.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -279,8 +282,6 @@ public:
|
||||
|
||||
bool MidiImport::readSMF( TrackContainer* tc )
|
||||
{
|
||||
QString filename = file().fileName();
|
||||
closeFile();
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ),
|
||||
@@ -291,7 +292,11 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
|
||||
pd.setValue( 0 );
|
||||
|
||||
Alg_seq_ptr seq = new Alg_seq(filename.toLocal8Bit(), true);
|
||||
std::stringstream stream;
|
||||
QByteArray arr = readAllData();
|
||||
stream.str(std::string(arr.constData(), arr.size()));
|
||||
|
||||
Alg_seq_ptr seq = new Alg_seq(stream, true);
|
||||
seq->convert_to_beats();
|
||||
|
||||
pd.setMaximum( seq->tracks() + preTrackSteps );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ReverbSC.cpp - A native reverb based on an algorithm by Sean Costello
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017 Paul Batchelor
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017 Paul Batchelor
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017 Paul Batchelor
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017 Paul Batchelor
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017 Paul Batchelor
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
|
||||
@@ -620,7 +620,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( QDir( ConfigManager::inst()->stkDir() ).absolutePath()
|
||||
.toLatin1().constData() );
|
||||
.toLocal8Bit().constData() );
|
||||
#ifndef LMMS_DEBUG
|
||||
Stk::showWarnings( false );
|
||||
#endif
|
||||
@@ -670,7 +670,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( QDir( ConfigManager::inst()->stkDir() ).absolutePath()
|
||||
.toLatin1().constData() );
|
||||
.toLocal8Bit().constData() );
|
||||
#ifndef LMMS_DEBUG
|
||||
Stk::showWarnings( false );
|
||||
#endif
|
||||
@@ -718,7 +718,7 @@ malletsSynth::malletsSynth( const StkFloat _pitch,
|
||||
{
|
||||
Stk::setSampleRate( _sample_rate );
|
||||
Stk::setRawwavePath( QDir( ConfigManager::inst()->stkDir() ).absolutePath()
|
||||
.toLatin1().constData() );
|
||||
.toLocal8Bit().constData() );
|
||||
#ifndef LMMS_DEBUG
|
||||
Stk::showWarnings( false );
|
||||
#endif
|
||||
|
||||
@@ -88,6 +88,7 @@ struct ERect
|
||||
#include "lmms_basics.h"
|
||||
#include "Midi.h"
|
||||
#include "communication.h"
|
||||
#include "IoHelper.h"
|
||||
|
||||
#include "VstSyncData.h"
|
||||
|
||||
@@ -678,9 +679,9 @@ void RemoteVstPlugin::init( const std::string & _plugin_file )
|
||||
|
||||
|
||||
|
||||
static void close_check( int fd )
|
||||
static void close_check( FILE* fp )
|
||||
{
|
||||
if( close( fd ) )
|
||||
if( fclose( fp ) )
|
||||
{
|
||||
perror( "close" );
|
||||
}
|
||||
@@ -790,7 +791,7 @@ void RemoteVstPlugin::destroyEditor()
|
||||
|
||||
bool RemoteVstPlugin::load( const std::string & _plugin_file )
|
||||
{
|
||||
if( ( m_libInst = LoadLibrary( _plugin_file.c_str() ) ) == NULL )
|
||||
if( ( m_libInst = LoadLibraryW( toWString(_plugin_file).c_str() ) ) == NULL )
|
||||
{
|
||||
// give VstPlugin class a chance to start 32 bit version of RemoteVstPlugin
|
||||
if( GetLastError() == ERROR_BAD_EXE_FORMAT )
|
||||
@@ -1072,13 +1073,13 @@ void RemoteVstPlugin::saveChunkToFile( const std::string & _file )
|
||||
const int len = pluginDispatch( 23, 0, 0, &chunk );
|
||||
if( len > 0 )
|
||||
{
|
||||
int fd = open( _file.c_str(), O_WRONLY | O_BINARY );
|
||||
if ( ::write( fd, chunk, len ) != len )
|
||||
FILE* fp = F_OPEN_UTF8( _file, "wb" );
|
||||
if ( fwrite( chunk, len, 1, fp ) != len )
|
||||
{
|
||||
fprintf( stderr,
|
||||
"Error saving chunk to file.\n" );
|
||||
}
|
||||
close_check( fd );
|
||||
close_check( fp );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1237,7 +1238,7 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
if (!isPreset &&!chunky) uIntToFile = (unsigned int) m_plugin->numPrograms;
|
||||
pBank->numPrograms = endian_swap( uIntToFile );
|
||||
|
||||
FILE * stream = fopen( _file.c_str(), "w" );
|
||||
FILE * stream = F_OPEN_UTF8( _file, "w" );
|
||||
fwrite ( pBank, 1, 28, stream );
|
||||
fwrite ( progName, 1, isPreset ? 28 : 128, stream );
|
||||
if ( chunky ) {
|
||||
@@ -1289,7 +1290,7 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
|
||||
unsigned int * pLen = new unsigned int[ 1 ];
|
||||
unsigned int len = 0;
|
||||
sBank * pBank = (sBank*) new char[ sizeof( sBank ) ];
|
||||
FILE * stream = fopen( _file.c_str(), "r" );
|
||||
FILE * stream = F_OPEN_UTF8( _file, "r" );
|
||||
if ( fread ( pBank, 1, 56, stream ) != 56 )
|
||||
{
|
||||
fprintf( stderr, "Error loading preset file.\n" );
|
||||
@@ -1390,12 +1391,12 @@ void RemoteVstPlugin::loadChunkFromFile( const std::string & _file, int _len )
|
||||
{
|
||||
char * chunk = new char[_len];
|
||||
|
||||
const int fd = open( _file.c_str(), O_RDONLY | O_BINARY );
|
||||
if ( ::read( fd, chunk, _len ) != _len )
|
||||
FILE* fp = F_OPEN_UTF8( _file, "rb" );
|
||||
if ( fread( chunk, 1, _len, fp ) != _len )
|
||||
{
|
||||
fprintf( stderr, "Error loading chunk from file.\n" );
|
||||
}
|
||||
close_check( fd );
|
||||
close_check( fp );
|
||||
|
||||
pluginDispatch( effSetChunk, 0, _len, chunk );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user