Commit Graph

2215 Commits

Author SHA1 Message Date
Tobias Doerffel
bf8f823751 Mixer: fixed wrong macro logic leading to potential performance loss
The macro logic for defining the SPINLOCK_PAUSE macro tested against
LMMS_HOST_X86_64 twice instead of testing against LMMS_HOST_X86_64 and
LMMS_HOST_X86. This caused the SPINLOCK_PAUSE macro not being set on
x86.
2009-08-03 18:53:10 +02:00
Tobias Doerffel
e0df82056c CAPS: updated to version 0.4.3
Updated CAPS plugins to version 0.4.3 - changes:

  * basics.h cleanup / comments
  * minor Makefile cleanup
  * comment cosmetics
  * Eq and Eq2x2 per-band Q changed to 1.414 (= 1 octave)
  * Eq lowest band default value fixed to read 0
  * Niclas' fix for the bessel function implemented
  * uninitialised plugin states eliminated thanks to Damon
  * linker options for OSX added to the Makefile

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-08-03 17:55:57 +02:00
Tobias Doerffel
60eba2e4c3 CpuX86: added support for memory prefetching
Added macros PREFETCH_READ() and PREFETCH_WRITE() which insert proper
prefetch instructions. At least on my Intel Atom CPU this improves
performany slightly. Probably needs some further tuning.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-08-03 17:14:58 +02:00
Tobias Doerffel
89fa5c99e9 CPU: new framework for optimized CPU-specific routines
The new CPU framework replaces the old BasicOps framework. It is more
flexible and the build process isn't such a mess anymore (pre-compiled
assembler files etc.). It will hopefully see some improvements and
extensions soon.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-08-03 17:14:16 +02:00
Tobias Doerffel
27d9c17e3f ZynAddSubFX: fixed compilation error
Fixed compilation error introduced by commit
f3e13c4427.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-08-02 14:17:54 +02:00
Tobias Doerffel
f3e13c4427 RemotePlugin: added QSTR_TO_STDSTR macro and use it in LVSL/ZASF
QString::toStdString() is not aware of locale specific characters (it
just converts to ASCII). Therefore added new macro QSTR_TO_STDSTR which
converts a QString to std::string with UTF8 characters.

Use this new macro in LMMS VST Support Layer and ZynAddSubFX plugin.
This fixes for example VST plugins not being loaded when the path to
the DLL contains non-ASCII (e.g. cyrillic) characters.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-29 17:05:57 +02:00
Tobias Doerffel
ab0160f9fc LameLibrary: fixed copyright notice
Removed myself from list of copyright holders as I didn't help out
with LAME support at all.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-28 23:18:20 +02:00
Tobias Doerffel
e115124075 WebResourcesProvider: support for HTTP forwardings + cleanups
Properly handle HTTP status code 302 which indicates a moved site,
i.e. try to fetch data from the new location. This finally makes
WebResources work again with LSP being moved to http://lmms.info.

Furthermore cleaned up code a bit. There's no need for a global
QHttp object or a global QBuffer object. Instead allocate them on
the stack in the according methods.

Furthermore removed unused/incomplete support for non-blocking download.
We should introduce support for a ProgressDialog solution (also allowing
to cancel operations) later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-17 11:49:51 +02:00
Andrew Kelley
1a19b60e97 TripleOscillator presets - fixed empty.wav
Translated userwave0="samples/empty.wav" to userwave0="" and such.
Additionally updated references - if they included "samples/" I
took that out since now they reference from samples already.
2009-07-16 17:16:21 -07:00
Andrew Kelley
d85d8b73d0 ConfigManager - add #ifdef LMMS_HAVE_FLUIDSYNTH
Fixed compliation bug for those who don't have
fluidsynth installed
2009-07-16 11:21:00 -07:00
Andrew Kelley
2b660e3756 automationPattern - deleted glitchy code
<superjoe> why is that code even there?
<pgib> until the next mixer-period, then the model's value is reset
to the actual automation track
<pgib> I have no idea. I think it should be removed honestly. again,
there is no comment explainign the true intent
* superjoe experiments
<pgib> it was probably a poor attempt to make it so when you adjust
the only automation point for a track, that the value of the model
will change immediately'
<pgib> I think it is safe to move the newTime==0 chunk
<pgib> if we want to make the automationEditor immediately change the
value, there needs to be more logic
<pgib> and it would belong in automationEditor -- not automationPattern

<pgib> but this fixes the superAutomation why-in-the-hell bug
2009-07-16 10:07:56 -07:00
Andrew Kelley
e0e93a9730 Resource Browser - smoother gui
When you press down or up while browsing in the resource browser,
it plays the sample.
FIXED: When you click on the keyboard in the resource browser, and then
click on the treeview, it didn't transfer focus.
2009-07-16 08:14:17 -07:00
Andrew Kelley
73fdfb4ef1 exportPorjectDialog - default output file format
exportProjectDialog - select the output file format based on
what the user has already chosen in the export dialog. Prevents
the user from having to choose twice.
(also fixed whitespace and added modelines where applicable)
2009-07-16 05:19:26 -07:00
Andrew Kelley
9cb6c6ab6a mainWindow - remove extra song editor
Use a branch to work on the new song editor, not an extraneous
window in master. Also fixed spaces.
2009-07-16 04:42:21 -07:00
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
c7205351c2 convert soft tabs to hard tabs and add a modeline 2009-07-16 03:30:31 -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
a9a8e1c3a5 sampleBuffer::decodeSampleMp3 implemented
AudioFileProcessor can now open MP3 samples.
2009-07-15 14:43:56 -07:00
Andrew Kelley
0e2c6762f0 AudioFileMp3 - fixed clipping issue
AudioFileMp3::rescale was missing a clip boundary on -1 and thus
could have caused artifacts in exported MP3s. Fixed.
2009-07-15 11:42:26 -07:00
Andrew Kelley
2741eb217a LameLibrary - separated lame functionality
LameLibrary can now be easily used to access lame functionality.
This way we can use the same lame structure for SampleBuffer
2009-07-15 10:20:38 -07:00
Andrew Kelley
1eb7490185 AudioFileMp3 - handle clipping better
Fixed bug - when a sample clipped it was causing an overflow, making
random noise where clipping happened. Now it clips properly.
2009-07-15 08:53:10 -07:00
Andrew Kelley
0390d4aadb SampleBuffer - message box upon decode sample fail
When SampleBuffer can't decode an audio sample, it explains why
in a friendly message box, instead of silently failing.
2009-07-15 08:20:06 -07:00
Andrew Kelley
4877f93583 Minor syntax formatting change for readability 2009-07-15 07:44:36 -07:00
Andrew Kelley
60a0bf9346 AudioFileMp3 - Use a configurable setting for lame
There is a new folder setting called Lame Library. AudioFileMp3
will look here for libmp3lame.so.0. If it can't find it it will
notify the user how to make it work and abort rendering gracefully.
2009-07-15 07:00:52 -07:00
Andrew Kelley
b99d79b4d2 Minor syntax cleanup for readability 2009-07-15 05:12:45 -07:00
Andrew Kelley
e53ea570b0 AudioFileMp3: provide support for mp3 export
Add MP3 as one of the options to export the project as. Currently
the lib path is hard-coded, need to add that to settings. It loads
lame dynamically.
2009-07-15 04:56:41 -07:00
Tobias Doerffel
a626763671 MainWindow: explicitely destroy ResourceBrowser instance
Explicitely destroy instance of ResourceBrowser in destructor of
MainWindow. This fixes crash at exit due to auto-deletion mechanisms
after the whole engine already has been shutdown.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-10 18:09:42 +02:00
Tobias Doerffel
cb72bf2260 MidiTime/Pattern: fixed divisions by zero with time sigs 1/16+
Setting time signatures 1/16+ lead to divisions by zero in two places.
Fixed this by adding according qMax() call (closes #2818125).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-10 17:47:37 +02: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
4f249400ac MidiPort: added realOutputChannel() returning zero-based MIDI channel
MidiPort::outputChannelModel is ranged from 1 to 16 for displaying
user-friendly values. However internally MIDI channels are ranged from
0 to 15. Therefore added realOutputChannel() which returns zero-based
MIDI channel which should be used everywhere except for the GUI.

Fixes MIDI events being sent to VST plugins on channel 2 instead of
channel 1. Makes some more VST plugins actually usable.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:10:33 +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
1015868e1f TrackContentWidget: fix graphical glitches with Qt 4.5
Starting with Qt 4.5 there were minor graphical glitches in
TrackContentWidget. Fix this by not setting Qt::WA_OpaquePaintEvent
attribute.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 21:16:41 +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
cf7539caaf PianoRoll: switch back to draw note after pasting notes
When pasing notes via Ctrl+V somehow the edit-tool was left in an
undefined state. Therefore explicitely switch back to draw mode so
user can move pasted notes (closes #2808607).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 10:43:09 +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
2ef5dffec0 RemotePlugin: refactored system feature configuration
Variuos features (native/Qt semaphores/shared memory) are now
configured by macros like USE_QT_SHMEM and USE_QT_SEMAPHORES. This
allows central and individual configuration of features according to
the platform to build for at the beginning of the file.

Finally makes RemotePlugin work on OS X by not using native semaphores
rather than QSystemSemaphore's.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:46:14 +02:00
Tobias Doerffel
fb58dc00ab InstrumentTrack: fixed muting of frozen patterns in BB tracks
In InstrumentTrack::play(...) the local variable "bb_track" always
was either undefined or NULL due to a lost call (probably during M/V
architecture switch) to bbTrack::findBBTrack(...). This could lead to
crashes and/or misbehaviour when playing frozen patterns in BB tracks.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:42:22 +02:00
Tobias Doerffel
913aa5a6e8 Track.h: removed unused class declaration "bbTrack"
The class forward declaration for "bbTrack" is neither used nor
required, therefore remove it.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:32:20 +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
33ce491caf RemotePlugin: added DEBUG_REMOTE_PLUGIN macro
Added new DEBUG_REMOTE_PLUGIN macro. If it is set, the process won't
be launched. Instead important information are printed allowing the
developer to run the process with according parameters in a debugger.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:01:00 +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