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:
62
ChangeLog
62
ChangeLog
@@ -1,3 +1,65 @@
|
||||
2007-10-04 Javier Serrano Polo <jasp00/at/terra/dot/es>
|
||||
|
||||
* 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/Makefile.am:
|
||||
renamed lvsl_server.c to lvsl_server.cpp
|
||||
|
||||
* plugins/vst_base/lvsl_server.cpp:
|
||||
restricted shared memory permissions
|
||||
|
||||
* plugins/vst_base/communication.h:
|
||||
improved string communication
|
||||
|
||||
* configure.in:
|
||||
look for wine header in system folder too
|
||||
|
||||
* configure.in:
|
||||
* Makefile.am:
|
||||
* plugins/Makefile.am:
|
||||
added extra plugins support
|
||||
|
||||
* include/main_window.h:
|
||||
* src/core/main_window.cpp:
|
||||
use desktop services for online help
|
||||
|
||||
* src/core/main_window.cpp:
|
||||
- use background artwork
|
||||
- updated wiki URL
|
||||
|
||||
* src/core/automation_editor.cpp:
|
||||
* src/core/piano_roll.cpp:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
* src/widgets/effect_label.cpp:
|
||||
fixed null workspace segfaults
|
||||
|
||||
* plugins/stk/mallets/mallets.cpp:
|
||||
enabled missing files message
|
||||
|
||||
* src/core/main.cpp:
|
||||
use processed argc/argv rather than deprecated functions
|
||||
|
||||
* plugins/singerbot/singerbot.cpp:
|
||||
detected heap corruption
|
||||
|
||||
* data/locale/ca.ts:
|
||||
updated translation
|
||||
|
||||
* plugins/polyb302/polyb302.cpp:
|
||||
* plugins/polyb302/polyb302.h:
|
||||
dropped Qt3-support
|
||||
|
||||
* 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`
|
||||
|
||||
19
configure.in
19
configure.in
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.4.0-svn20070916, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20070916)
|
||||
AC_INIT(lmms, 0.4.0-svn20071004, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20071004)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -219,7 +219,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"
|
||||
@@ -227,6 +237,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"
|
||||
@@ -238,6 +249,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
|
||||
@@ -627,6 +639,7 @@ AC_CONFIG_FILES([Makefile
|
||||
plugins/vst_base/Makefile
|
||||
plugins/vst_effect/Makefile
|
||||
lmms.spec])
|
||||
LOCAL_EXTRA_PLUGINS
|
||||
AC_OUTPUT
|
||||
|
||||
with_warnings="false"
|
||||
|
||||
Binary file not shown.
1153
data/locale/ca.ts
1153
data/locale/ca.ts
File diff suppressed because it is too large
Load Diff
@@ -125,8 +125,6 @@ private:
|
||||
|
||||
void finalize( void );
|
||||
|
||||
bool have_www_browser( void );
|
||||
|
||||
|
||||
QWorkspace * m_workspace;
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -111,7 +111,10 @@ automationEditor::automationEditor( void ) :
|
||||
}
|
||||
|
||||
// add us to workspace
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
// add time-line
|
||||
m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt,
|
||||
|
||||
@@ -86,10 +86,10 @@ int main( int argc, char * * argv )
|
||||
QString extension = "wav";
|
||||
QString file_to_load;
|
||||
|
||||
for( int i = 1; i < app.argc(); ++i )
|
||||
for( int i = 1; i < argc; ++i )
|
||||
{
|
||||
if( QString( app.argv()[i] ) == "--version" ||
|
||||
QString( app.argv()[i] ) == "-v" )
|
||||
if( QString( argv[i] ) == "--version" ||
|
||||
QString( argv[i] ) == "-v" )
|
||||
{
|
||||
printf( "\nLinux MultiMedia Studio %s\n\n"
|
||||
"Copyright (c) 2004-2007 Tobias Doerffel and others.\n\n"
|
||||
@@ -101,9 +101,8 @@ int main( int argc, char * * argv )
|
||||
argv[0] );
|
||||
return( 0 );
|
||||
}
|
||||
else if( app.argc() > i &&
|
||||
( QString( app.argv()[i] ) == "--help" ||
|
||||
QString( app.argv()[i] ) == "-h" ) )
|
||||
else if( argc > i && ( QString( argv[i] ) == "--help" ||
|
||||
QString( argv[i] ) == "-h" ) )
|
||||
{
|
||||
printf( "\nLinux MultiMedia Studio %s\n"
|
||||
"Copyright (c) 2004-2007 Tobias Doerffel and others.\n\n"
|
||||
@@ -117,38 +116,35 @@ int main( int argc, char * * argv )
|
||||
PACKAGE_VERSION );
|
||||
return( 0 );
|
||||
}
|
||||
else if( app.argc() > i &&
|
||||
( QString( app.argv()[i] ) == "--render" ||
|
||||
QString( app.argv()[i] ) == "-r" ) )
|
||||
else if( argc > i && ( QString( argv[i] ) == "--render" ||
|
||||
QString( argv[i] ) == "-r" ) )
|
||||
{
|
||||
file_to_load = QString( app.argv()[i+1] );
|
||||
file_to_load = QString( argv[i + 1] );
|
||||
file_to_render = baseName( file_to_load ) + ".";
|
||||
++i;
|
||||
}
|
||||
else if( app.argc() > i &&
|
||||
( QString( app.argv()[i] ) == "--output-format" ||
|
||||
QString( app.argv()[i] ) == "-o" ) )
|
||||
else if( argc > i &&
|
||||
( QString( argv[i] ) == "--output-format" ||
|
||||
QString( argv[i] ) == "-o" ) )
|
||||
{
|
||||
extension = QString( app.argv()[i+1] );
|
||||
extension = QString( argv[i + 1] );
|
||||
if( extension != "wav" && extension != "ogg" )
|
||||
{
|
||||
printf( "\nInvalid output format %s.\n\n"
|
||||
"Try \"%s --help\" for more information.\n\n", app.argv()[i+1],
|
||||
argv[0] );
|
||||
"Try \"%s --help\" for more information.\n\n", argv[i + 1], argv[0] );
|
||||
return( -1 );
|
||||
}
|
||||
++i;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( app.argv()[i][0] == '-' )
|
||||
if( argv[i][0] == '-' )
|
||||
{
|
||||
printf( "\nInvalid option %s.\n\n"
|
||||
"Try \"%s --help\" for more information.\n\n", app.argv()[i],
|
||||
argv[0] );
|
||||
"Try \"%s --help\" for more information.\n\n", argv[i], argv[0] );
|
||||
return( -1 );
|
||||
}
|
||||
file_to_load = app.argv()[i];
|
||||
file_to_load = argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QDesktopServices>
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QCloseEvent>
|
||||
#include <QtGui/QSplitter>
|
||||
@@ -40,7 +44,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "main_window.h"
|
||||
#include "bb_editor.h"
|
||||
#include "song_editor.h"
|
||||
#include "piano_roll.h"
|
||||
@@ -142,8 +145,11 @@ mainWindow::mainWindow( void ) :
|
||||
m_workspace->setScrollBarsEnabled( TRUE );
|
||||
|
||||
#warning TODO
|
||||
/* m_workspace->setBackground( embed::getIconPixmap(
|
||||
"background_artwork" ) );*/
|
||||
m_workspace->setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( m_workspace->backgroundRole(),
|
||||
embed::getIconPixmap( "background_artwork" ) );
|
||||
m_workspace->setPalette( pal );
|
||||
}
|
||||
|
||||
hbox->addWidget( side_bar );
|
||||
@@ -445,7 +451,8 @@ void mainWindow::finalize( void )
|
||||
// help-popup-menu
|
||||
QMenu * help_menu = new QMenu( this );
|
||||
menuBar()->addMenu( help_menu )->setText( tr( "&Help" ) );
|
||||
if( have_www_browser() )
|
||||
// May use offline help
|
||||
if( TRUE )
|
||||
{
|
||||
help_menu->addAction( embed::getIconPixmap( "help" ),
|
||||
tr( "Online help" ),
|
||||
@@ -723,7 +730,7 @@ void mainWindow::help( void )
|
||||
tr( "Currently there's no help "
|
||||
"available in LMMS.\n"
|
||||
"Please visit "
|
||||
"http://wiki.mindrules.net "
|
||||
"http://lmms.sf.net/wiki "
|
||||
"for documentation on LMMS." ),
|
||||
QMessageBox::Ok );
|
||||
}
|
||||
@@ -941,32 +948,12 @@ void mainWindow::showTool( QAction * _idx )
|
||||
|
||||
|
||||
|
||||
|
||||
bool mainWindow::have_www_browser( void )
|
||||
{
|
||||
int ret = system( "which x-www-browser > /dev/null" );
|
||||
return( WIFEXITED( ret ) && WEXITSTATUS( ret ) == EXIT_SUCCESS );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::browseHelp( void )
|
||||
{
|
||||
pid_t pid = fork();
|
||||
if( pid == -1 )
|
||||
{
|
||||
perror( "fork" );
|
||||
}
|
||||
else if( pid == 0 )
|
||||
{
|
||||
// TODO: use QDesktopService with Qt4
|
||||
QString url = "http://lmms.sf.net/wiki/index.php?title=Main_Page";
|
||||
execlp( "x-www-browser", "x-www-browser",
|
||||
url.toAscii().constData(), NULL );
|
||||
perror( "execlp" );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
// file:// alternative for offline help
|
||||
QString url = "http://lmms.sf.net/wiki/index.php?title=Main_Page";
|
||||
QDesktopServices::openUrl( url );
|
||||
// TODO: Handle error
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -183,7 +183,10 @@ pianoRoll::pianoRoll( void ) :
|
||||
}
|
||||
|
||||
// add us to workspace
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
// add time-line
|
||||
m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt,
|
||||
|
||||
@@ -151,15 +151,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 );
|
||||
|
||||
@@ -114,7 +114,10 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
}
|
||||
|
||||
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
|
||||
@@ -62,7 +62,10 @@ effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
m_track,
|
||||
m_track->getAudioPort() );
|
||||
|
||||
engine::getMainWindow()->workspace()->addWindow( m_effWidget );
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( m_effWidget );
|
||||
}
|
||||
|
||||
m_effWidget->setWindowTitle( _initial_name );
|
||||
m_effWidget->setFixedSize( 240, 242 );
|
||||
|
||||
Reference in New Issue
Block a user