amd64 support, extra plugins support, some fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@568 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -30,4 +30,5 @@ SUBDIRS = \
|
||||
$(STK_DIR) \
|
||||
triple_oscillator \
|
||||
$(VST_DIRS) \
|
||||
vibed
|
||||
vibed \
|
||||
$(EXTRA_PLUGINS)
|
||||
|
||||
@@ -380,15 +380,11 @@ polyb302Synth::polyb302Synth( instrumentTrack * _track ) :
|
||||
m_wave_knob->setLabel( tr( "WAVE" ) );
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
connect( m_vcf_cut_knob, SIGNAL( valueChanged( float ) ),
|
||||
this, SLOT ( filterChanged( float ) ) );
|
||||
@@ -577,7 +573,7 @@ void polyb302Synth::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
void polyb302Synth::db24Toggled( bool )
|
||||
{
|
||||
for( vlist<handleState *>::iterator it = m_handleStates.begin();
|
||||
for( QList<handleState *>::iterator it = m_handleStates.begin();
|
||||
it != m_handleStates.end(); ++it )
|
||||
{
|
||||
( *it )->db24Toggled();
|
||||
@@ -589,7 +585,7 @@ void polyb302Synth::db24Toggled( bool )
|
||||
|
||||
void polyb302Synth::detuneChanged( float )
|
||||
{
|
||||
for( vlist<handleState *>::iterator it = m_handleStates.begin();
|
||||
for( QList<handleState *>::iterator it = m_handleStates.begin();
|
||||
it != m_handleStates.end(); ++it )
|
||||
{
|
||||
( *it )->detuneChanged();
|
||||
@@ -603,7 +599,7 @@ void polyb302Synth::detuneChanged( float )
|
||||
// recalcFilter.
|
||||
void polyb302Synth::filterChanged( float )
|
||||
{
|
||||
for( vlist<handleState *>::iterator it = m_handleStates.begin();
|
||||
for( QList<handleState *>::iterator it = m_handleStates.begin();
|
||||
it != m_handleStates.end(); ++it )
|
||||
{
|
||||
( *it )->filterChanged();
|
||||
@@ -665,7 +661,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 +813,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 +886,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 )
|
||||
{
|
||||
|
||||
@@ -244,7 +244,7 @@ private:
|
||||
|
||||
knob * m_slide_dec_knob;
|
||||
|
||||
vlist<handleState *> m_handleStates;
|
||||
QList<handleState *> m_handleStates;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -394,6 +394,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)))",
|
||||
@@ -450,7 +451,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() )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* mallets.h - tuned instruments that one would bang upon
|
||||
* mallets.cpp - tuned instruments that one would bang upon
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -23,19 +23,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include "mallets.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#include "BandedWG.h"
|
||||
#include "ModalBar.h"
|
||||
#include "TubeBell.h"
|
||||
|
||||
#include "mallets.h"
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_track.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "templates.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
@@ -66,9 +67,9 @@ mallets::mallets( instrumentTrack * _instrument_track ) :
|
||||
{
|
||||
m_filesMissing =
|
||||
!QDir( configManager::inst()->stkDir() ).exists() ||
|
||||
!QFileInfo( configManager::inst()->stkDir()+QDir::separator()
|
||||
!QFileInfo( configManager::inst()->stkDir() + QDir::separator()
|
||||
+ "sinewave.raw" ).exists();
|
||||
#if 0
|
||||
|
||||
// for some reason this crashes...???
|
||||
if( m_filesMissing )
|
||||
{
|
||||
@@ -78,7 +79,7 @@ mallets::mallets( instrumentTrack * _instrument_track ) :
|
||||
"the full Stk-package is installed!" ),
|
||||
QMessageBox::Ok );
|
||||
}
|
||||
#endif
|
||||
|
||||
m_modalBarWidget = setupModalBarControls( this, _instrument_track );
|
||||
setWidgetBackground( m_modalBarWidget, "artwork" );
|
||||
|
||||
|
||||
@@ -401,7 +401,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 );
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QX11EmbedContainer>
|
||||
#include <QtGui/QX11Info>
|
||||
|
||||
@@ -155,7 +154,7 @@ remoteVSTPlugin::remoteVSTPlugin( const QString & _plugin ) :
|
||||
{
|
||||
break;
|
||||
}
|
||||
QApplication::processEvents( QEventLoop::AllEvents, 50 );
|
||||
QCoreApplication::processEvents( QEventLoop::AllEvents, 50 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,8 +327,8 @@ bool remoteVSTPlugin::waitForProcessingFinished( sampleFrame * _out_buf )
|
||||
{
|
||||
for( fpp_t frame = 0; frame < frames; ++frame )
|
||||
{
|
||||
_out_buf[frame][ch] = m_shm[(m_inputCount+ch)*
|
||||
frames+frame];
|
||||
_out_buf[frame][ch] = m_shm[( m_inputCount + ch ) *
|
||||
frames + frame];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +343,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();
|
||||
}
|
||||
@@ -536,7 +540,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;
|
||||
Reference in New Issue
Block a user