Commit Graph

36 Commits

Author SHA1 Message Date
Tobias Doerffel
08c0916916 RemoteVstPlugin: silence compiler warning
Initialize variable of type DWORD with 0 instead of NULL.
(cherry picked from commit 5f33f1ea77)
2010-07-25 11:35:35 +02:00
Tobias Doerffel
206715d82b RemoteVstPlugin: allocate buffer for chunk on heap rather than stack
It's not a good idea to allocate the buffer for VST chunk data on the
stack as chunks might become quite big (several megabytes) and thus
could cause a stack overflow. Fix this by using new/delete.
(cherry picked from commit 5f241e6374)
2009-12-06 01:04:11 +01:00
Tobias Doerffel
132b7c7df4 RemoteVstPlugin: removed plugin dispatching in hostCallback
There's no need to call plugin dispatcher in hostCallback. It makes
plugins like Garritan Personal Orchestra 4 lock up. After removing
these calls the affected plugins work.
(cherry picked from commit 44e25a6ad5)
2009-09-28 22:52:48 +02:00
Tobias Doerffel
1d5cb23385 File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
2009-08-25 01:30:41 +02:00
Tobias Doerffel
29d0d2b43a 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>
(cherry picked from commit c4c94985a6)
2009-07-09 12:54:59 +02:00
Tobias Doerffel
6883e0479c 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>
(cherry picked from commit 4ad5add745)
2009-07-09 12:54:59 +02:00
Tobias Doerffel
598d1dc816 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>
(cherry picked from commit e7ab8e5670)
2009-07-09 12:54:59 +02:00
Tobias Doerffel
9fc0d8962d 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>
(cherry picked from commit 2240d6644d)
2009-07-09 12:54:59 +02:00
Tobias Doerffel
00ca278f2f 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>
(cherry picked from commit 41c9318be8)
2009-07-09 12:43:57 +02:00
Tobias Doerffel
c66fa25dfe 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>
(cherry picked from commit d6a451bdf5)
2009-07-07 18:37:32 +02:00
Tobias Doerffel
c1f5075e16 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>
(cherry picked from commit 48a3d4ebe4)
2009-07-07 17:09:41 +02:00
Tobias Doerffel
7c2b3e6240 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>
(cherry picked from commit 5838f63d0b)
2009-07-07 01:58:09 +02:00
Tobias Doerffel
d8c616afcf 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>
(cherry picked from commit 206d906c10)
2009-07-07 01:58:00 +02:00
Tobias Doerffel
4e81299729 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>
(cherry picked from commit 38f7552ce4)
2009-07-07 01:57:50 +02:00
Tobias Doerffel
7ef61b04d7 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>
(cherry picked from commit e65b282166)
2009-07-07 01:57:42 +02:00
Tobias Doerffel
33917e4340 RemoteVstPlugin: coding style fixes
Renamed class remoteVstPlugin to RemoteVstPlugin + other minor coding
style fixes.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cca39513d0)
2009-07-07 01:57:32 +02:00
Tobias Doerffel
1e0acbef85 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>
(cherry picked from commit db878b664d)
2009-07-07 01:57:23 +02:00
Tobias Doerffel
798c179b58 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>
(cherry picked from commit 9b5c0d19f8)
2009-07-07 01:57:12 +02:00
Tobias Doerffel
12aaffe149 VstBase: initial support for saving/restoring chunks
Some VST plugins save their state as chunks rather than parameters.
According code to save/restore those chunks has been taken from FST 1.9.
However restore currently is disabled as it mostly fails for whatever
reason.
(cherry picked from commit 0abd4aad70)
2009-07-07 01:56:39 +02:00
Tobias Doerffel
5bb9af15ab 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>
(cherry picked from commit b3c5d498e2)
2009-06-02 00:51:29 +02:00
Tobias Doerffel
4ec030b518 RemoteVstPlugin: removed obsolete warning
Removed obsolete warning about setting realtime. It's neither important
nor will calling printf()/fprintf() in a RemotePlugin print anything in
LMMS' console output.
(cherry picked from commit 337afffbf1)
2009-04-10 00:08:13 +02:00
Tobias Doerffel
40627ffc53 RemoteVstPlugin: fix issues with uniqueID
Removed the newline character at the end of the uniqueID array, decreased
array size to 5 and initialize last element with 0 after sprintf() call.
(cherry picked from commit 7d1a357076)
2009-04-10 00:07:55 +02:00
Tobias Doerffel
315cd1936d RemoteVstPlugin: use std::vector rather than std::list
For some reason, building remote_vst_plugin.cpp with recent
wineg++/gcc-multilib on 64 bit platforms causes undefined symbols:

remote_vst_plugin-JzpHs6.o: In function `std::list<VstMidiEvent, std::allocator<VstMidiEvent> >::_M_insert(std::_List_iterator<VstMidiEvent>, VstMidiEvent const&)':
remote_vst_plugin.cpp:(.text._ZNSt4listI12VstMidiEventSaIS0_EE9_M_insertESt14_List_iteratorIS0_ERKS0_[std::list<VstMidiEvent, std::allocator<VstMidiEvent> >::_M_insert(std::_List_iterator<VstMidiEvent>, VstMidiEvent const&)]+0x35): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'

Replacing std::list with std::vector for queueing MIDI events seems to
fix this issue. Consider this as a workaround rather than constructive fix.
(cherry picked from commit c0ff1aa95c)
2009-04-07 12:41:15 +02:00
Tobias Doerffel
4569b635d9 RemoteVstPlugin: use SplittedThreading model for MDA plugins
Most of the MDA VST plugins require the SplittedThreading model in order
to run properly. All plugins whose unique ID starts with "mda" will be
driven with the SplittedThreading model.
(cherry picked from commit 96fb6f5a38)
2009-03-22 14:53:54 +01:00
Tobias Doerffel
dcb9f4dfb9 removed debugging messages (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1903 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-12-10 00:46:27 +00:00
Tobias Doerffel
46fe11b395 rewrote wide parts of LVSL backend, see ChangeLog for details (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1901 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-12-10 00:42:09 +00:00
Tobias Doerffel
b289c7a7a5 explicitely declare updateSampleRate() and updateBufferSize() as virtual (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1868 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-12-04 19:54:29 +00:00
Tobias Doerffel
30c7732665 various fixes for successfully building LMMS for win64
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1804 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-27 21:25:46 +00:00
Tobias Doerffel
6008028852 various tweakings in LVSL
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1776 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-18 21:53:36 +00:00
Tobias Doerffel
d118b13257 renamed types.h to lmms_basics.h
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1748 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-06 18:45:20 +00:00
Tobias Doerffel
782fd7de09 made remotePluginClient::process() have no return value
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1694 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-22 23:36:37 +00:00
Tobias Doerffel
da2fcf130a UI finetuning / recompression of some PNG-files
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1589 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-08 12:47:11 +00:00
Tobias Doerffel
da59be05c8 cleanups
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1547 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-04 21:49:03 +00:00
Tobias Doerffel
a7e2ca44bb made VST support layer work on native win32
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1546 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-04 16:21:38 +00:00
Tobias Doerffel
5b98f07f22 rewrote VST support layer to use the new remotePlugin-framework
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1542 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-03 16:07:15 +00:00
Tobias Doerffel
3a7955d068 moved from lvsl_server.cpp
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1539 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-03 08:27:20 +00:00