* set common numeric locale to make atof() work properly in Germany
* increased SHM_FIFO_SIZE from 4000 to 64000 for not getting stuck when exchanging bigger messages (e.g. parameter dumps) git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1548 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -84,6 +84,7 @@ CHECK_INCLUDE_FILES(sys/ioctl.h LMMS_HAVE_SYS_IOCTL_H)
|
||||
CHECK_INCLUDE_FILES(ctype.h LMMS_HAVE_CTYPE_H)
|
||||
CHECK_INCLUDE_FILES(string.h LMMS_HAVE_STRING_H)
|
||||
CHECK_INCLUDE_FILES(process.h LMMS_HAVE_PROCESS_H)
|
||||
CHECK_INCLUDE_FILES(locale.h LMMS_HAVE_LOCALE_H)
|
||||
|
||||
|
||||
# check for Qt4
|
||||
|
||||
@@ -70,6 +70,10 @@ typedef int32_t key_t;
|
||||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BUILD_REMOTE_PLUGIN_CLIENT
|
||||
#undef EXPORT
|
||||
@@ -80,9 +84,10 @@ typedef int32_t key_t;
|
||||
#include <QtCore/QProcess>
|
||||
#endif
|
||||
|
||||
// sometimes we need to exchange bigger messages (e.g. for VST parameter dumps)
|
||||
// so set a usable value here
|
||||
const int SHM_FIFO_SIZE = 64000;
|
||||
|
||||
// 4000 should be enough - this way we only need to allocate one page
|
||||
const int SHM_FIFO_SIZE = 4000;
|
||||
|
||||
// implements a FIFO inside a shared memory segment
|
||||
class shmFifo
|
||||
@@ -159,11 +164,12 @@ public:
|
||||
|
||||
if( sem_init( m_dataSem, 1, 1 ) )
|
||||
{
|
||||
printf( "could not initialize m_dataSem\n" );
|
||||
fprintf( stderr, "could not initialize m_dataSem\n" );
|
||||
}
|
||||
if( sem_init( m_messageSem, 1, 0 ) )
|
||||
{
|
||||
printf( "could not initialize m_messageSem\n" );
|
||||
fprintf( stderr, "could not initialize "
|
||||
"m_messageSem\n" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -779,6 +785,11 @@ remotePluginBase::remotePluginBase( shmFifo * _in, shmFifo * _out ) :
|
||||
m_in( _in ),
|
||||
m_out( _out )
|
||||
{
|
||||
#ifdef LMMS_HAVE_LOCALE_H
|
||||
// make sure, we're using common ways to print/scan
|
||||
// floats to/from strings (',' vs. '.' for decimal point etc.)
|
||||
setlocale( LC_NUMERIC, "C" );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#cmakedefine LMMS_HAVE_CTYPE_H
|
||||
#cmakedefine LMMS_HAVE_STRING_H
|
||||
#cmakedefine LMMS_HAVE_PROCESS_H
|
||||
#cmakedefine LMMS_HAVE_LOCALE_H
|
||||
|
||||
/* defines for libsamplerate */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user