Commit Graph

592 Commits

Author SHA1 Message Date
Andrew Kelley
2aae228af4 Refactor supportedFileExts from AudioFileProcessor
Refactor supported file extensions from AudioFileProcessor to
sampleBuffer, where the magic really happens. Change the hard-
coded MessageBox explaining supported formats to the real deal.
Also added modelines and switched spaces to tabs in the files
affected.
2009-07-16 04:34:11 -07:00
Andrew Kelley
2009d71015 AudioFileProcessor - add mp3 to supported exts
AudioFileProcessor is aware that it can play
MP3 files now. Thus MP3 files work in the
resources browser.
2009-07-15 15:16:07 -07:00
Andrew Kelley
4877f93583 Minor syntax formatting change for readability 2009-07-15 07:44:36 -07:00
Tobias Doerffel
c4c94985a6 RemoteVstPlugin: fixed typo in 4ad5add745
Commit 4ad5add745 introduced a typo which
lead to compilation failure. This commit fixes it.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:49:21 +02:00
Tobias Doerffel
4ad5add745 RemoteVstPlugin: typedef VstMidiEventList
Added a typedef for VstMidiEventList so actual type does not have
to be hard-coded each time in the code.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:36:27 +02:00
Tobias Doerffel
e7ab8e5670 RemoteVstPlugin: don't process MIDI events in GUI thread
Don't process MIDI events in GUI thread as this might corrupt MIDI
event array if both GUI and processing thread access it. Fixes
possible crashes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:33:51 +02:00
Tobias Doerffel
2240d6644d RemoteVstPlugin: encapsulate locking in separate inline functions
Locking the plugin is now achieved by calling RemoteVstPlugin::lock()
and RemoteVstPlugin::unlock().

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:31:59 +02:00
Tobias Doerffel
41c9318be8 RemoteVstPlugin: removed different threading models
Different threading models aren't used anymore as SplittedThreadingModel
after all recent improvements works fine for all plugins tested so far.
It even shows that a lot more VST plugins are running now properly.
Therefore all support for TraditionalThreadingModel has been removed
which greatly simplifies code and makes it much more maintainable.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 00:38:05 +02:00
Tobias Doerffel
dffd9ecfbe RemoteVstPlugin: prefer chunks over parameters for settings
When saving or restoring settings, prefer chunks over parameters.
This fixes some problems with plugins which get confused e.g. if you
restore individual parameters rather than the whole chunk.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 21:21:25 +02:00
Tobias Doerffel
d6a451bdf5 RemoteVstPlugin: define O_BINARY to 0 on Linux
O_BINARY flag is not supported on Linux, therefore define it to 0.
Fixes compilation failure on Linux.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 18:35:51 +02:00
Tobias Doerffel
48a3d4ebe4 RemoteVstPlugin: open file with O_BINARY when reading/writing chunks
When writing chunk to file or read it back from file, open file with
O_BINARY flag. Otherwise on win32 for example line endings (\n) are
converted (\r\n) and with real binary data this screws up things.

Thanks to Oleg Sharonov for pointing this out.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 17:05:31 +02:00
Tobias Doerffel
0de2949aed ZynAddSubFX/FLTK: updated to SVN revision 6826
Updated FLTK to SVN revision 6826 of branch-1.3:

- Corrected const methods of Fl_Text_{Buffer|Display|Selection}
  to be declared const, corrected an Fl_Text_Buffer attrib. typo
- Fixed OpenGL shared context handling (STR #2135)
- Fixed gray-scale images with alpha channel (STR #2105)
- Fixed unexpected shortcut behavior for Win32 (STR #2199)
- Fixed documentation for Fl_Progress (STR #2209)

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 02:08:34 +02:00
Tobias Doerffel
ea376e90fe ZynAddSubFX: now build on OS X as well
Now that we fixed RemotePlugin support on OS X, we can enable build of
ZynAddSubFX on OS X. Some GUI threading issues still have to be solved
though.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:53:46 +02:00
Tobias Doerffel
5838f63d0b RemoteVstPlugin: print number of inputs/outputs as debugg message
When input/output count changes, always print new number of inputs and
outputs as debugg message.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:21:16 +02:00
Tobias Doerffel
206d906c10 RemoteVstPlugin: reset m_inputs and m_outputs in updateInOutCount()
Reset m_inputs and m_outputs to NULL after deleting the memory they're
pointing to. Fixes possible crash if new input or output count is 0
and the count changes again later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 00:45:26 +02:00
Tobias Doerffel
38f7552ce4 RemoteVstPlugin: workaround for early host callbacks by some plugins
Some plugins call host callback from within their main function,
causing RemoteVstPlugin::m_plugin not to be set yet. Therefore
explicitely set RemoteVstPlugin::m_plugin if it's NULL. Makes plugins
by Wallander Instruments (and possibly others as well) work.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 00:18:06 +02:00
Tobias Doerffel
e65b282166 RemoteVstPlugin: thread-safe plugin dispatching
Plugin dispatcher was called without any protection from various threads
leading to regular crashes or deadlocks within the plugin. The plugin
dispatching is now encapsulated into one central function which protects
the dispatcher by a mutex.

Furthermore improved handling of audioMasterIdle and
audioMasterUpdateDisplay in host callback by posting a message to GUI
thread asking for idle processing instead of directly calling plugin
dispatcher.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 12:39:47 +02:00
Tobias Doerffel
cca39513d0 RemoteVstPlugin: coding style fixes
Renamed class remoteVstPlugin to RemoteVstPlugin + other minor coding
style fixes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 12:37:04 +02:00
Tobias Doerffel
db878b664d RemoteVstPlugin: fixed threading issues with saving/restoring chunks
Saving and restoring chunks from/to plugin seems to work now after a
few tweaks regarding memory-allocation and threading (according
functions need to be called from withing GUI thread). However needs the
new code some testing (especially whether it breaks previously working
plugins).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 01:31:53 +02:00
Tobias Doerffel
9b5c0d19f8 RemoteVstPlugin: added more NULL checks
Check for m_plugin being NULL in RemoteVstPlugin::inputCount(),
RemoteVstPlugin::outputCount() and RemoteVstPlugin::pluginVersion().
Makes various VST's load properly now.

Thanks to Oleg Sharonov for pointing this out.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-06 01:09:56 +02:00
Tobias Doerffel
d1353247d9 Sf2Player: allocate temporary buffer on stack if possible
When compiling with GCC always allocate a temporary buffer for
resampling on stack rather than doing an expensive heap allocation.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-05 16:33:49 +02:00
Paul Giblock
2a69917d51 Add Korean translation 2009-07-03 21:37:06 -04:00
Tobias Doerffel
f943df139e InstrumentView: added generic DnD support, renamed/splitted files
Added generic drag'n'drop support for all instrument views. All
resources supported by the according instrument now can be dropped
onto instrument view without any extra code in actual instrument.

Additionally renamed some files and classes related to InstrumentView
class to match new style.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-30 01:19:48 +02:00
Tobias Doerffel
9588e3dcce VeSTige: adapted to resource framework
Adapted VeSTige plugin to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:35:52 +02:00
Tobias Doerffel
01fc74939c Sf2Player: adapted to resource framework
Adapted Sf2Player plugin to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:30:12 +02:00
Tobias Doerffel
6ebe8df65a MidiImport: adapted to resource framework
Adapted MidiImport plugin to new resource framework support in plugin
base class. Files for PatMan or soundfonts for Sf2Player are now
relocated using resources framework.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 23:29:07 +02:00
Tobias Doerffel
9701ed5c31 ZynAddSubFX: adapted to resource framework
Adapted ZynAddSubFX plugin to new resource framework support in plugin
base class.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 14:43:33 +02:00
Tobias Doerffel
3507a44175 PatMan: adapted to resource framework
Adapted PatMan to new resource framework support in plugin
base class.

Furthermore some coding style improvements.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 13:26:34 +02:00
Tobias Doerffel
f4c2249d3a AudioFileProcessor: adapted to resource framework
Adapted AudioFileProcessor to new resource framework support in plugin
base class.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-29 13:24:45 +02:00
Tobias Doerffel
fd9d2b0e61 Do not build ZynAddSubFX on OS X
Do not build the ZynAddSubFX plugin on OS X until a proper replacement
for unnamed semaphores (which for whatever reason are not supported on
OS X) has been implemented. Using the win32 code (QSystemSemaphore)
could be an option but needs testing.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-28 23:42:38 +02:00
Tobias Doerffel
ed30985aa4 Various fixes for properly building on OS X
There were various (trivial) problems with settings of the build system
which prevented LMMS from being built on OS X.

Thanks to Daniel Klaffenbach for providing his Mac for development
purposes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-28 23:42:38 +02:00
Tobias Doerffel
08ea133aa2 NotePlayHandle: cleanups, header dependency reductions etc.
* do not include instrument_track.h in note_play_handle.h by making
  two functions non-inline
* renamed notePlayHandleVector / constNotePlayHandleVector to
  NotePlayHandleList / ConstNotePlayHandleList and changed typedef
  to QList (which has faster insert- and remove-operations).
* removed unused method willFinishThisPeriod()

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-15 14:41:55 +02:00
Tobias Doerffel
5a00ebd360 MultimediaProject: splitted constructor for loading either file or data
The old constructor treated the string argument either as filename or
as raw XML data, depending on 2nd parameter. This is a mess and quickly
leads to confusion.

Now we have two constructors taking either a filename as string or a
QByteArray with XML data. Loading actual data has been separated into
MultimediaProject::loadData( const QByteArray & ).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-05 00:55:25 +02:00
Tobias Doerffel
b3c5d498e2 RemoteVstPlugin: use SplittedThreading model for Proteus VX
Proteus VX requires SplittedThreading model in order to run properly.
Issues with actually working UI interaction still need to be worked
out although it rather looks like a bug in WINE.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-02 00:45:04 +02:00
Tobias Doerffel
dc539d88de ZynAddSubFX: fixed compilation failure of FLTK if glibc >= 2.10
Fixed compilation failure of FLTK on systems with glibc newer than
version 2.9 where the signature of scandir(...) has changed.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-01 00:55:23 +02:00
Tobias Doerffel
3003163e9b ZynAddSubFX: fixed compilation failure of FLTK
Fixed compilation failure of FLTK on broken systems where strchr()
takes a non-const char pointer.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-06-01 00:44:06 +02:00
Tobias Doerffel
5b1900c4d0 ZynAddSubFX: processed UI files with Fluid from FLTK 1.3 branch
Processed all Fluid UI files with Fluid from FLTK 1.3 branch so the
generated code is up to date.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-05-31 18:38:40 +02:00
Tobias Doerffel
8affa66c61 ZynAddSubFX: integrated FLTK 1.3.0 branch from SVN
Integrated FLTK 1.3.0 branch from SVN which brings UTF8 support and
fully integrated Xft support (SVN rev. 6791).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-05-31 18:38:24 +02:00
Tobias Doerffel
c86f7b5104 TripleOscillator: dynamically change range of fine detuning knobs
Similiar to the pitch knob of a instrument track, the range of the fine
detuning knobs in TripleOscillator is now changed dynamically as well.
This allows new kind of sounds by hardsyncing with a detuning of up
to +/- 2400 cents.
2009-05-16 17:29:55 +02:00
Frederik
af284e980f Allow compilation with -Werror=format-security
This commit fixes some calls to functions that are taking a format
string and an optional set of parameters as arguments. At some places
no format string was specified if only a simple C string was to be
sprintf()ed.  However for security reasons this is bad and was replaced
by code like

	sprintf( dest, "%s", str );
2009-05-05 23:23:52 +02:00
Andrew Kelley
134a20efe0 fixed dependency on libfluidsynth without checking for LMMS_HAVE_FLUIDSYNTH 2009-05-05 05:20:27 -07:00
Tobias Doerffel
ccb65f4b40 Added universal codebase for dragging plugin-specific presets
Added new stringPairDrag type "pluginpresetfile", allowing to drag
and drop any kind of plugin-specific preset files everywhere in the
program. Adopted changes in ZynAddSubFX plugin.
2009-05-03 16:10:06 +02:00
Tobias Doerffel
3a4ae3a434 VstEffect: check whether VST effect has an editor
Depending on whether VST effect has an editor return 1 or 0 in
VstEffectControls::getControlCount(). This prevents the EffectView in
the effect rack from showing a "Controls" button and creating an empty
subwindow.
2009-05-03 15:13:22 +02:00
Tobias Doerffel
044d671471 VstPlugin: added hasEditor() method
Added inline method hasEditor() with returns true or false depending on
whether the class received a window ID from the remote plugin.
2009-05-03 15:12:34 +02:00
Tobias Doerffel
324b5afb50 LV2: fixed serious violations of coding style conventions
Unfortunately new LV2 code didn't respect coding style conventions
so I fixed most of it and did various other cleanups. Still needs some
work though.
2009-04-30 01:09:20 +02:00
Martin Andrews
b40a9e1905 LV2: Manager now in LMMS core
Moved LV2Manager to LMMS core so it can be used by several plugins.
Furthermore made LMMS instead of LV2 browser plugin link against SLV2
libraries.
2009-04-30 00:29:38 +02:00
Martin Andrews
d1cfe69412 LV2Browser: initial version
This commit integrates initial support for LV2 plugins. This currently
includes the LV2 browser and is meant for development purposes only.
According changes were made to the build system in order to find
required libraries and header files.
2009-04-30 00:12:49 +02:00
Tobias Doerffel
d38d437349 ZynAddSubFX: added support for d'n'd XIZ files onto ZASF plugin
This commit allows the user to drag'n'drop DLL files onto ZynAddSubFX
instrument (inside LMMS).
2009-04-18 23:52:42 +02:00
Tobias Doerffel
75382de976 ZynAddSubFX: do not lock up after rendering project
Do not lock up after rendering project by calling waitForInitDone()
on our own (instead of in RemotePlugin constructor) with busy waiting
disabled.
2009-04-18 17:43:30 +02:00
Tobias Doerffel
dfab704100 ZynAddSubFX: do not subclass RemotePlugin
Create an own RemotePlugin object rather than inheriting from it.
This allows to restart ZASF RemotePlugin which for example is required
upon samplerate changes (closes #2626249).

Furthermore this commit cleans up some old unused stuff.
2009-04-18 17:24:30 +02:00