Merge branch 'stable-1.2'
# Conflicts: # data/locale/pl.ts # include/SongEditor.h # plugins/vst_base/CMakeLists.txt # src/core/Song.cpp # src/gui/editors/SongEditor.cpp
This commit is contained in:
@@ -306,7 +306,7 @@ void organicInstrument::playNote( NotePlayHandle * _n,
|
||||
// fxKnob is [0;1]
|
||||
float t = m_fx1Model.value();
|
||||
|
||||
for (int i=0 ; i < frames ; i++)
|
||||
for (int i=0 ; i < frames + offset ; i++)
|
||||
{
|
||||
_working_buffer[i][0] = waveshape( _working_buffer[i][0], t ) *
|
||||
m_volModel.value() / 100.0f;
|
||||
|
||||
@@ -734,6 +734,7 @@ void RemoteVstPlugin::init( const std::string & _plugin_file )
|
||||
|
||||
static void close_check( FILE* fp )
|
||||
{
|
||||
if (!fp) {return;}
|
||||
if( fclose( fp ) )
|
||||
{
|
||||
perror( "fclose" );
|
||||
@@ -1128,6 +1129,12 @@ void RemoteVstPlugin::saveChunkToFile( const std::string & _file )
|
||||
if( len > 0 )
|
||||
{
|
||||
FILE* fp = F_OPEN_UTF8( _file, "wb" );
|
||||
if (!fp)
|
||||
{
|
||||
fprintf( stderr,
|
||||
"Error opening file for saving chunk.\n" );
|
||||
return;
|
||||
}
|
||||
if ( fwrite( chunk, 1, len, fp ) != len )
|
||||
{
|
||||
fprintf( stderr,
|
||||
@@ -1293,6 +1300,12 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
pBank->numPrograms = endian_swap( uIntToFile );
|
||||
|
||||
FILE * stream = F_OPEN_UTF8( _file, "w" );
|
||||
if (!stream)
|
||||
{
|
||||
fprintf( stderr,
|
||||
"Error opening file for saving preset.\n" );
|
||||
return;
|
||||
}
|
||||
fwrite ( pBank, 1, 28, stream );
|
||||
fwrite ( progName, 1, isPreset ? 28 : 128, stream );
|
||||
if ( chunky ) {
|
||||
@@ -1345,6 +1358,12 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
|
||||
unsigned int len = 0;
|
||||
sBank * pBank = (sBank*) new char[ sizeof( sBank ) ];
|
||||
FILE * stream = F_OPEN_UTF8( _file, "r" );
|
||||
if (!stream)
|
||||
{
|
||||
fprintf( stderr,
|
||||
"Error opening file for loading preset.\n" );
|
||||
return;
|
||||
}
|
||||
if ( fread ( pBank, 1, 56, stream ) != 56 )
|
||||
{
|
||||
fprintf( stderr, "Error loading preset file.\n" );
|
||||
@@ -1446,6 +1465,12 @@ void RemoteVstPlugin::loadChunkFromFile( const std::string & _file, int _len )
|
||||
char * chunk = new char[_len];
|
||||
|
||||
FILE* fp = F_OPEN_UTF8( _file, "rb" );
|
||||
if (!fp)
|
||||
{
|
||||
fprintf( stderr,
|
||||
"Error opening file for loading chunk.\n" );
|
||||
return;
|
||||
}
|
||||
if ( fread( chunk, 1, _len, fp ) != _len )
|
||||
{
|
||||
fprintf( stderr, "Error loading chunk from file.\n" );
|
||||
|
||||
@@ -3,7 +3,7 @@ INCLUDE(BuildPlugin)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# definitions for ZynAddSubFX
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD)
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
|
||||
FIND_PACKAGE(X11)
|
||||
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DOS_LINUX)
|
||||
|
||||
Reference in New Issue
Block a user