merged some of Javiers recent changes to trunk
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@570 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
29
ChangeLog
29
ChangeLog
@@ -1,3 +1,32 @@
|
||||
2007-10-08 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
merged some of Javiers recent changes to trunk:
|
||||
|
||||
* configure.in:
|
||||
* plugins/vst_base/lvsl_client.cpp:
|
||||
* plugins/vst_base/lvsl_server.cpp:
|
||||
* plugins/vst_base/Makefile.am:
|
||||
* src/lib/journalling_object.cpp:
|
||||
amd64 fixes
|
||||
|
||||
* plugins/vestige/vestige.cpp:
|
||||
fixed loading deadlock
|
||||
|
||||
* plugins/vst_base/lvsl_server.c:
|
||||
restricted shared memory permissions
|
||||
|
||||
* plugins/vst_base/communication.h:
|
||||
improved string communication
|
||||
|
||||
* configure.in:
|
||||
look for wine header in system folder too
|
||||
|
||||
* plugins/singerbot/singerbot.cpp:
|
||||
detected heap corruption
|
||||
|
||||
* plugins/polyb302/polyb302.cpp:
|
||||
applied relevant LB302 changes
|
||||
|
||||
2007-09-25 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* include/mixer.h:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -name \*.moc`
|
||||
|
||||
18
configure.in
18
configure.in
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.3.0, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.3.0)
|
||||
AC_INIT(lmms, 0.3.0-svn20071008, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.3.0-svn20071008)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -218,7 +218,17 @@ if test "x$with_vst" = "xyes" ; then
|
||||
|
||||
if test "$build_linux" = "true" ; then
|
||||
AC_CHECK_PROG(WINECXX, wineg++, /usr/bin/wineg++,,/usr/bin)
|
||||
AC_CHECK_LIB([wine], [wine_init], true)
|
||||
|
||||
if test "x`uname -m`" != "xx86_64" ; then
|
||||
AC_CHECK_LIB([wine], [wine_init], true)
|
||||
else
|
||||
AMD64_BUILD=yes
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="-m32 $CFLAGS"
|
||||
AC_CHECK_LIB([wine], [wine_init], true)
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
fi
|
||||
|
||||
if test ! -z "$WINECXX" ; then
|
||||
AC_LANG_PUSH(C++)
|
||||
# CXXFLAGS="$CXXFLAGS -I${prefix}/include/wine/windows"
|
||||
@@ -226,6 +236,7 @@ if test "x$with_vst" = "xyes" ; then
|
||||
OLDCPPFLAGS="$CPPFLAGS"
|
||||
CXX="$WINECXX"
|
||||
CPPFLAGS="$CPPFLAGS -I${prefix}/include/wine/windows"
|
||||
CPPFLAGS+=" -I/usr/include/wine/windows"
|
||||
AC_CHECK_HEADER(windows.h, HAVE_WINDOWS_H="true")
|
||||
CXX="$OLDCXX"
|
||||
CPPFLAGS="$OLDCPPFLAGS"
|
||||
@@ -237,6 +248,7 @@ if test "x$with_vst" = "xyes" ; then
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(VST_SUPPORT, test ! -z "$WINECXX")
|
||||
AM_CONDITIONAL(AMD64_BUILD, test "x$AMD64_BUILD" = "xyes")
|
||||
|
||||
|
||||
# check for LADSPA-SDK
|
||||
|
||||
@@ -665,7 +665,8 @@ polyb302Synth::handleState::handleState( const polyb302Synth * _synth )
|
||||
m_vcf_envpos = ENVINC;
|
||||
m_vco_detune = 0;
|
||||
|
||||
m_vca_mode = 2;
|
||||
// Start VCA on an attack.
|
||||
m_vca_mode = 0;
|
||||
m_vca_a = 0;
|
||||
//m_vca_attack = 1.0 - 0.94406088;
|
||||
m_vca_attack = 1.0 - 0.96406088;
|
||||
@@ -816,19 +817,6 @@ void polyb302Synth::handleState::process( sampleFrame * _outbuf,
|
||||
m_sample_cnt++;
|
||||
m_vcf_envpos++;
|
||||
|
||||
// 01/21/07 Changed to VCF -> VCA instead of VCA -> VCF
|
||||
#ifdef LB_FILTERED
|
||||
float samp = m_vcf->process( m_vco_k ) * 2.0 * m_vca_a;
|
||||
#else
|
||||
float samp = m_vco_k * m_vca_a;
|
||||
#endif
|
||||
|
||||
for( int c = 0; c < DEFAULT_CHANNELS; c++ )
|
||||
{
|
||||
_outbuf[i][c] = samp;
|
||||
}
|
||||
|
||||
|
||||
// update vco
|
||||
m_vco_c += m_vco_inc * _freq;
|
||||
if( m_vco_c > 0.5 )
|
||||
@@ -902,19 +890,30 @@ void polyb302Synth::handleState::process( sampleFrame * _outbuf,
|
||||
break;
|
||||
}
|
||||
|
||||
// Make it louder. For the better?
|
||||
//m_vco_k*=2.0;
|
||||
// Write out samples.
|
||||
#ifdef LB_FILTERED
|
||||
float samp = m_vcf->process( m_vco_k ) * 2.0 * m_vca_a;
|
||||
#else
|
||||
float samp = m_vco_k * m_vca_a;
|
||||
#endif
|
||||
|
||||
for( int c = 0; c < DEFAULT_CHANNELS; c++ )
|
||||
{
|
||||
_outbuf[i][c] = samp;
|
||||
}
|
||||
|
||||
|
||||
// Handle Envelope
|
||||
// TODO: Add decay once I figure out how to extend past the end
|
||||
// of a note.
|
||||
if( m_sample_cnt >= 0.5 * engine::getMixer()->sampleRate() )
|
||||
{
|
||||
m_vca_mode = 2;
|
||||
}
|
||||
if( m_vca_mode == 0 )
|
||||
{
|
||||
m_vca_a += ( m_vca_a0 - m_vca_a ) * m_vca_attack;
|
||||
if( m_sample_cnt >= 0.5
|
||||
* engine::getMixer()->sampleRate() )
|
||||
{
|
||||
m_vca_mode = 2;
|
||||
}
|
||||
}
|
||||
else if( m_vca_mode == 1 )
|
||||
{
|
||||
|
||||
@@ -452,6 +452,7 @@ void singerBot::synThread::run( void )
|
||||
|
||||
void singerBot::synThread::text_to_wave( void )
|
||||
{
|
||||
//TODO: Heap corruption too -> move to separate process?
|
||||
char command[80];
|
||||
sprintf( command,
|
||||
"(set! duffint_params '((start %f) (end %f)))",
|
||||
@@ -508,7 +509,7 @@ EST_Wave * singerBot::synThread::get_wave( const char * _name )
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
EST_Relation *r = utterance( lutt )->relation( "Wave" );
|
||||
EST_Relation * r = utterance( lutt )->relation( "Wave" );
|
||||
|
||||
//TODO: This check is useless. The error is fatal.
|
||||
if ( !r || !r->head() )
|
||||
|
||||
@@ -456,7 +456,9 @@ void vestigeInstrument::openPlugin( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
engine::getMixer()->lock();
|
||||
setParameter( "plugin", ofd.selectedFiles()[0] );
|
||||
engine::getMixer()->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,19 @@ libvstbase_la_SOURCES = vst_base.cpp \
|
||||
lvsl_client.cpp \
|
||||
lvsl_client.h
|
||||
|
||||
CC = wineg++
|
||||
pkglib_PROGRAMS = lvsl_server
|
||||
lvsl_server_SOURCES = lvsl_server.c communication.h
|
||||
lvsl_server_SOURCES = lvsl_server.cpp communication.h
|
||||
lvsl_server_CPPFLAGS = $(AM_CPPFLAGS) -I${prefix}/include/wine/windows
|
||||
lvsl_server_CPPFLAGS += -I/usr/include/wine/windows
|
||||
lvsl_server_LINK = wineg++ -mwindows -lpthread -o $(pkglib_PROGRAMS)
|
||||
nobase_pkglib_DATA = $(pkglib_PROGRAMS).exe.so
|
||||
|
||||
if AMD64_BUILD
|
||||
lvsl_server_CXXFLAGS = -m32 $(AM_CXXFLAGS)
|
||||
lvsl_server_LINK += -m32 -Wb,--as-cmd="as --32",--ld-cmd="ld -melf_i386" \
|
||||
-L/usr/lib32
|
||||
endif
|
||||
|
||||
CLEANFILES = $(MOC_FILES) $(nobase_pkglib_DATA)
|
||||
|
||||
install-exec-hook:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* communication.h - header file defining stuff concerning communication between
|
||||
* LVSL-server and -client
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -61,8 +61,9 @@ inline void writeValue( const T & _i, int _fd = 1 )
|
||||
static inline std::string readString( int _fd = 0 )
|
||||
{
|
||||
Sint16 len = readValue<Sint16>( _fd );
|
||||
char * sc = new char[len];
|
||||
char * sc = new char[len + 1];
|
||||
read( _fd, sc, len );
|
||||
sc[len] = '\0';
|
||||
std::string s( sc );
|
||||
delete[] sc;
|
||||
return( s );
|
||||
@@ -73,7 +74,7 @@ static inline std::string readString( int _fd = 0 )
|
||||
|
||||
static inline void writeString( const char * _str, int _fd = 1 )
|
||||
{
|
||||
int len = strlen( _str ) + 1;
|
||||
int len = strlen( _str );
|
||||
writeValue<Sint16>( len, _fd );
|
||||
write( _fd, _str, len );
|
||||
}
|
||||
|
||||
@@ -382,7 +382,12 @@ void remoteVSTPlugin::enqueueMidiEvent( const midiEvent & _event,
|
||||
{
|
||||
lock();
|
||||
writeValueS<Sint16>( VST_ENQUEUE_MIDI_EVENT );
|
||||
writeValueS<midiEvent>( _event );
|
||||
|
||||
writeValueS<midiEventTypes>( _event.m_type );
|
||||
writeValueS<Sint8>( _event.m_channel );
|
||||
writeValueS<Uint16>( _event.m_data.m_param[0] );
|
||||
writeValueS<Uint16>( _event.m_data.m_param[1] );
|
||||
|
||||
writeValueS<f_cnt_t>( _frames_ahead );
|
||||
unlock();
|
||||
}
|
||||
@@ -578,7 +583,7 @@ Sint16 remoteVSTPlugin::processNextMessage( void )
|
||||
case VST_SHM_KEY_AND_SIZE:
|
||||
{
|
||||
Uint16 shm_key = readValueS<Uint16>();
|
||||
size_t shm_size = readValueS<size_t>();
|
||||
size_t shm_size = readValueS<Uint32>();
|
||||
setShmKeyAndSize( shm_key, shm_size );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ void VSTPlugin::resizeSharedMemory( void )
|
||||
int shm_id;
|
||||
Uint16 shm_key = 0;
|
||||
while( ( shm_id = shmget( ++shm_key, s, IPC_CREAT | IPC_EXCL |
|
||||
0666 ) ) == -1 )
|
||||
0600 ) ) == -1 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ void VSTPlugin::resizeSharedMemory( void )
|
||||
|
||||
writeValue<Sint16>( VST_SHM_KEY_AND_SIZE );
|
||||
writeValue<Uint16>( shm_key );
|
||||
writeValue<size_t>( s );
|
||||
writeValue<Uint32>( s );
|
||||
}
|
||||
|
||||
|
||||
@@ -1206,7 +1206,14 @@ int main( void )
|
||||
|
||||
case VST_ENQUEUE_MIDI_EVENT:
|
||||
{
|
||||
const midiEvent ev = readValue<midiEvent>();
|
||||
midiEventTypes type =
|
||||
readValue<midiEventTypes>();
|
||||
Sint8 channel = readValue<Sint8>();
|
||||
Uint16 param1 = readValue<Uint16>();
|
||||
Uint16 param2 = readValue<Uint16>();
|
||||
const midiEvent ev = midiEvent( type, channel,
|
||||
param1, param2 );
|
||||
|
||||
const f_cnt_t fr_ahead = readValue<f_cnt_t>();
|
||||
plugin->enqueueMidiEvent( ev, fr_ahead );
|
||||
break;
|
||||
|
||||
@@ -161,15 +161,16 @@ void journallingObject::saveJournal( QDomDocument & _doc,
|
||||
QDomElement journal_de = _doc.createElement( "journal" );
|
||||
journal_de.setAttribute( "id", id() );
|
||||
journal_de.setAttribute( "entries", m_journalEntries.size() );
|
||||
journal_de.setAttribute( "curentry", m_currentJournalEntry -
|
||||
m_journalEntries.begin() );
|
||||
journal_de.setAttribute( "curentry", (int)( m_currentJournalEntry -
|
||||
m_journalEntries.begin() ) );
|
||||
journal_de.setAttribute( "metadata", TRUE );
|
||||
|
||||
for( journalEntryVector::const_iterator it = m_journalEntries.begin();
|
||||
it != m_journalEntries.end(); ++it )
|
||||
{
|
||||
QDomElement je_de = _doc.createElement( "entry" );
|
||||
je_de.setAttribute( "pos", it - m_journalEntries.begin() );
|
||||
je_de.setAttribute( "pos", (int)( it -
|
||||
m_journalEntries.begin() ) );
|
||||
je_de.setAttribute( "actionid", it->actionID() );
|
||||
je_de.setAttribute( "data", base64::encode( it->data() ) );
|
||||
journal_de.appendChild( je_de );
|
||||
|
||||
Reference in New Issue
Block a user