Commit Graph

2345 Commits

Author SHA1 Message Date
Tobias Doerffel
4f5d31f862 MixerWorkerThread: exit outer loop in processJobQueue() if finished
Exit the outer loop of processJobQueue() Only as soon as we went through
the job queue without having processed at least one job.

In MixerWorkerThread::waitForJobs() re-introduced "pause" instruction on
x86 and x86_64 giving better performance on HyperThreading systems.

These improvements however still do not solve all performance and
multithreading issues.
2009-10-19 01:13:22 +02:00
Tobias Doerffel
05b1325c09 Song: do not refresh FxMixerView when loading song in console mode
Calling FxMixerView::refreshDisplay causes LMMS to crash when running
in console mode. Therefore explicitely check GUI mode before calling
this function.
2009-10-19 01:03:22 +02:00
Tobias Doerffel
a9d24d34f2 Mixer/FxMixer: separated MixerWorkerThread and ThreadableJob into files
Declarations and implementations of MixerWorkerThread and ThreadableJob
have been moved into separate source files.

Furthermore there were some improvements to MixerWorkerThreads.
MixerWorkerThread::processJobQueue() does not return until the job
queue completely has been processed. This way each thread can "help"
to finish processing the queue and does not get back to sleep until
all of the work is done.

Management of the queue is now done via an array of QAtomicPointers.
Items that are non-NULL still need to be processed while NULL-items
were taken from the queue (i.e. in progress or done). Thus we do not
need to deal with ThreadableJob-states within MixerWorkerThread anymore.
2009-10-14 01:44:41 +02:00
Andrew Kelley
c4647a58ac Merge commit 'origin/master' into fx-mixer-rework 2009-10-13 03:15:33 -07:00
Andrew Kelley
45a2f81eaa Rough fix for freeze-up bug
Added startJobs() to the waitForJobs() loop, and don't give up in
masterMix() until status of master channel is Done.
2009-10-13 03:14:23 -07:00
Andrew Kelley
95eb60f05f Fixed the audio/visual screwups
With the help of Toby, effects in the channels work and the peak
displays correctly. However the freeze-up bug is still wreaking havoc.
2009-10-13 02:21:13 -07:00
Andrew Kelley
f6f4414c98 NOT WORKING! Fx Mixer uses job threads
The FxMixer now uses job threads to accomplish its mixing. It's
theoretically efficient, but there is a horrible thread bug
preventing the code from working. I've spent 5 hours debugging and
need some external help!
2009-10-12 01:09:35 -07:00
Tobias Doerffel
3fa96a576c Mixer: rewrote/reorganized job queueing for worker threads
In Mixer, the old C-macro based code has been replaced by an OOP-like
design. Management of job queue now happens via some static member
methods of MixerWorkerThread. All the moved code still needs to be
splitted into some new files but here's a first dirty version.

All objects that are intended to be processed by MixerWorkerThreads
have to inherit ThreadableJob (name of class is subject of change).

One can add jobs to the job queue even if the queue is already being
processed. This is merely important for multithreading with upcoming
FX sends support.
2009-10-11 01:43:16 +02:00
Paul Giblock
49c2f6bad1 Rename "All Files" to "All file types" release QM
Translations didn't work because I didn't "release" within Linguist.  I
wonder how to update the *.ts files with missing strings...
2009-10-08 14:39:24 -04:00
Paul Giblock
beb92563f1 Proper File import extensions and translations
Previously, the extensions were stored in the translations, this i18n
more difficult, additionally, there was a preprocessor statement that
would cause the translated phrase to change! Hence, no translations if
you didn't have ZIP file support.  The text is now split into seperate
translations and I added "All Files".
2009-10-08 12:01:25 -04:00
Paul Giblock
c504bc84d4 Increase import filter for *.midi and *.riff
Fix song.cpp and translations so the somewhat common *.midi extension is
recognized.
2009-10-07 17:21:29 -04:00
Krzysztof Foltman
1294ff62ee + Organ, Framework: use std::vector::front() instead of std::vector::data() (may possibly fix the MacOS X compilation problem reported by Daniel Klaffenbach and Tobias Doerffel)
(cherry picked from commit 628eb1543591f5137e6001abad439d01942ffd4a)
2009-10-05 23:47:38 +02:00
Tobias Doerffel
68bd237061 Revert "CALF: removed usage of non-standard std::vector::data()"
This reverts commit dd260245ec.

The commit fixed the compilation problem but according to upstream
causes new problems because of the huge data structures on the stack.

Upstream provided a better patch which will be applied next.
2009-10-05 23:44:53 +02:00
Tobias Doerffel
dd260245ec CALF: removed usage of non-standard std::vector::data()
The std::vector::data() method is a special feature of GCC and
therefore not portable. This causes a compile failure of CALF plugin
on OS X. Therefore I replaced the code with standard arrays
allocated on stack.

Upstream needs to be informed about this patch.

Thanks to Daniel Klaffenbach for pointing out this issue.
2009-10-03 01:16:05 +02:00
Krzysztof Foltman
66a5ae5066 + Monosynth: code cleanup (move more things to .cpp file, ignore the negligible performance hit)
(cherry picked from commit 24f4661a73fe39e70db8e74b9a5c1279859b6fb3)
2009-10-03 00:27:57 +02:00
Tobias Doerffel
b8d339e196 CALF: moved some files to allow easy cherry-picking from CALF Git
Source directory structure of the CALF plugin shipped with LMMS was
not equal with original one which makes cherry-picking commits from
CALF Git impossible.
2009-10-03 00:23:18 +02:00
Andrew Kelley
abfdb6a74d Fixed bug - Instruments had wrong channel models
Instruments were initialized with hardcoded 0-10 for min/max
channel selector range. Fixed.
2009-10-01 17:42:14 -07:00
Andrew Kelley
1c9b24afb7 Fixed a mixer bug regarding deleting channels 2009-10-01 11:37:46 -07:00
Andrew Kelley
23e3301037 FxMixerView - Left and right to select channels 2009-10-01 03:45:04 -07:00
Andrew Kelley
275bf5bb0e Fix FL Import with new mixer 2009-10-01 03:40:20 -07:00
Andrew Kelley
333df687e6 Ability to save mixer sends to disk with the mmp
LMMS can load projects with the old mixer and new projects with
the new mixer. By "new mixer", I simply mean not hardcoded to 64
channels.
2009-10-01 02:45:32 -07:00
Andrew Kelley
dd28a654b5 Channel selector has a max range of num channels
When you add and remove channels, the range of the
L.E.D. channel selector is correct.
2009-09-30 17:04:28 -07:00
Andrew Kelley
f6507b52ee fixes segfault when importing a midi file
pitanga's patch - fixes a segfault when trying
to import a midi file without a default soundfont set.
2009-09-30 07:49:01 -07:00
Andrew Kelley
33753495bd Ability to re-order mixer channels
In the Fx Mixer View, you can select a channel and press Alt+Left
and Alt+Right respectively to re-order Fx Channels. This should be
made more easily available in the GUI eventually.
2009-09-30 07:37:05 -07:00
Andrew Kelley
e09c12687a Ability to delete mixer channels in the FX Mixer
Users can now delete mixer channels from the FX mixer, and it
doesn't mess up the instrument send channels.
2009-09-30 07:36:40 -07:00
Andrew Kelley
186378a4f1 Fixed segfault when libmp3lame.so is not found
Applied pitanga's patch against lame_library -
Fixes missing return statement if the library
was not found. (Thanks pitanga)
2009-09-30 02:08:18 -07:00
Paul Giblock
147844b388 Merge branch 'master' of ssh://pgib@lmms.git.sourceforge.net/gitroot/lmms/lmms into fx-mixer-rework 2009-09-30 03:14:57 -04:00
Paul Giblock
db6164ca91 Requested improvements to new FxMixerView$
* lock fx mixer height
 Done. channelArea->setFixedHeight and proper sizeConstraints
* width: pick a good min. size. keep max. size off.
 Done. Set to 6 fx-lines.
* effects chain should align to the right
 Done.
* get rid of padding in mixer
 Done. setSpacing and setMargin on chLayout
* scroll area so that vert scrollbar is  never seen.
 Done. setVerticalScrollBarPolicy and proper height calculation
* Get rid of scroll bar area border
 Done. FrameStyle.

The biggest change, however, was removing the multiple EffectRackViews
that were being used.  Now just a single EffectRackView exists and it is
shared by all models.
2009-09-30 03:12:25 -04:00
Andrew Kelley
d68d53b83a Scrollbar for the fx mixer channels
Still need to fix up the rest of the fx mixer
2009-09-29 20:54:30 -07:00
Andrew Kelley
504a03f2cf prevent infinite mixing loops
Prevent infinite mixing loops by disabling the send button for
a channel line when clicking it would cause an infinite loop.
2009-09-29 19:16:19 -07:00
Paul Giblock
2622edd140 Fix issue with knobs in 3xOsc and AudioFilePro.
The knobs were broken because the classnames of these instruments was
changed without properly changing the selectors in the style.css
2009-09-28 10:02:08 -04:00
Tobias Doerffel
44e25a6ad5 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.
2009-09-28 13:45:58 +02:00
Tobias Doerffel
c896488e13 Moved ChangeLog file to ChangeLog.old
As it's not maintained anymore but should be kept for archival reasons
I moved ChangeLog to ChangeLog.old.
2009-09-23 23:24:12 +02:00
Nikos Chantziaras
0f28295ac7 ZynAddSubFX: link fftw3f after ZASF core libs
Commit 3c18e436cd makes it impossible to
build LMMS with embedded ZynAddSubFX if "-Wl,--as-needed" is used in
LINKER_FLAGS during the link step of RemoteZynAddSubFx:

  Linking CXX executable RemoteZynAddSubFx
  libZynAddSubFxCore.so: undefined reference to `fftwf_plan_r2r_1d'
  libZynAddSubFxCore.so: undefined reference to `fftwf_execute'
  libZynAddSubFxCore.so: undefined reference to `fftwf_destroy_plan'

This happens because fftw3f, which is a system lib, is linked to before
the ZASF core libs when linking RemoteZynAddSubFx. With "--as-needed",
correct library order matters.
2009-09-23 14:38:45 +02:00
Andrew Kelley
ce7891b7bd Fix mixer sends rendering in the backend
Fixed: Buffers was cleared too early resulting in some combinations
of sends not working.
2009-09-17 14:37:01 -07:00
Andrew Kelley
289f004c28 Pretty interface in default theme for fx sends
Created a user interface so you can add and remove FX sends as
well as tweak how much you are sending. The gui does not
yet prevent the user from creating endless render loops.
Additionally, there seems to be some issues to work out regarding
rendering with multiple sends.
2009-09-17 14:37:01 -07:00
Andrew Kelley
89d5be7855 Used FloatModels as the backend for mixer sends
Can add new channels in the mixer, and sends are implemented.
Instruments are hardcoded at 10. FL Import is hardcoded at 64.
2009-09-17 14:37:01 -07:00
Andrew Kelley
45c4b7b824 Mixer sends work in the backend
The backend code of mixer uses mixer sends to compute effects.
2009-09-17 14:37:01 -07:00
Tobias Doerffel
3c18e436cd ZynAddSubFX: resynced with their Git repo
ZynAddSubFX has gained some new developer power so development has been
going on well for quite a while now in their Git repo. It's time for
the first big resync so future changes can be integrated easily.
2009-09-17 23:29:09 +02:00
Tobias Doerffel
b73474ca73 ZynAddSubFX: eliminate global data in favour of per-synth data
OscilGen::tmpsmps and OscilGen::outoscilFFTfreqs were static member
variables initialized once in LocalZynAddSubFx class. However having
this data global is not a good idea because it gets modified by each
synth (possibly in parallel), causing heavy distortion under various
circumstances. Now that this data is allocated and used per-synth
everything works fine.
2009-09-15 23:40:36 +02:00
Tobias Doerffel
6940d19969 InstrumentPlayHandle: do not process if InstrumentTrack is muted
While regular instruments were excluded from processing when muted
this did not happen for InstrumentPlayHandle-based instruments. Muting
for exampling tracks with VSTi's inside did not decrease CPU usage.
Checking whether related InstrumentTrack is muted before calling
Instrument::play() fixes this issue.

Closes #2857426.
2009-09-15 10:10:02 +02:00
Tobias Doerffel
bb4c93ce37 WebResourceProvider: moved from QHttp to QNetworkAccessManager
QHttp is quite low-level while QNetworkAccessManager offers a well
designed API for accessing network resources. Therefore switched backend
of WebResourceProvider from QHttp to QNetworkAccessManager.
2009-09-15 01:24:57 +02:00
Paul Giblock
669b4e7198 Fix bug 2819817: main window scrollbars
Fix problem with main-window scrollbars not adjusting when toggling
off-screen children.  Seems like Qt bug #260116.
2009-09-11 00:07:12 -04:00
Tobias Doerffel
5c96adbd6d ZynAddSubFX: fix plugin descriptor name
While fixing the name of the plugin library in commit
883836aa8a the plugin descriptor
structure has not been updated.
2009-09-02 22:32:21 +02:00
Tobias Doerffel
883836aa8a ZynAddSubFX: keep plugin filename lower case
If we'd rename all plugins like I did with ZynAddSubFX, we'd run into
serious troubles, therefore keep plugin names lower case.
2009-09-01 00:14:21 +02:00
Tobias Doerffel
9ca04feb1d Win32: added missing symbol exports
Some new classes lacked the EXPORT declaration so they were not
accessible by plugins. Fixed this.
2009-08-30 14:52:36 +02:00
Tobias Doerffel
b4526ec1b4 AudioFileFlac: allow compilation withoug FLAC support
Compilation of AudioFileFlac source files failed when there's been
no FLAC support on the system. Fix this by adding according #ifdef's.
2009-08-28 23:56:15 +02:00
Tobias Doerffel
ee63a13f2d RemotePlugin: do not skip audio processing when debugging
If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned
as RemotePlugin::isRunning() returned false. Fix this by always
returning true when debugging.
2009-08-28 23:54:18 +02:00
Tobias Doerffel
78536d9065 ZynAddSubFX: fixed win32 compilation of FLTK and MXML
Some platform-specific constants got renamed during sed-mass-replace.
Fix this by reverting concerning constant names.
2009-08-28 23:53:02 +02:00
Tobias Doerffel
f1d383d04d ZynAddSubFX: added GUI-less mode
Added a new GUI-less mode to ZynAddSubFX instrument plugin which allows
to let ZynAddSubFX audio processing happen within LMMS, giving a much
better realtime behaviour.

As soon as showing up the GUI settings of GUI-less ZynAddSubFX instance
are saved and a traditional RemoteZynAddSubFx process is being launched
and the settings are applied there.
2009-08-28 23:52:38 +02:00