Commit Graph

1151 Commits

Author SHA1 Message Date
Tobias Doerffel
7c16094811 Fixed spelling errors
Fixed some spelling errors found by Lintian while checking the Debian
package of LMMS. Thanks to Patrick Winnertz for pointing out this issue.
(cherry picked from commit 9fd3dacb67)
2010-01-25 23:27:43 +01:00
Tobias Doerffel
6d890557a7 ConfigMgr: fix initialization of various paths if they do not exist
We should not only test whether a specific path (e.g. STK or LADSPA
path) is empty but also whether it does not exist so we can reset it
to a sensible default value (for example when upgrading LMMS on Win32
where the program's path will change).

Furthermore default to "C:\Program Files\VstPlugins" for the VST
directory on Win32 which is the default location for VST plugins.
2009-12-25 00:38:14 +01:00
Tobias Doerffel
e852c8b267 MainWindow: stop playing song when asking whether to save project
Users reported the last buffer played repeatedly while the dialog asking
whether to save project is shown. This behaviour even continued while
loading a project. An easy workaround for this is to stop playing song
(or whichever TrackContainer is active at the moment) in
MainWindow::mayChangeProject().

Closes bug #2904781.
(cherry picked from commit 04699ba412)
2009-12-17 21:19:21 +01:00
Tobias Doerffel
d7ae99a5e8 TrackContentWidget: fixed background tile pixmap updating
The background tile pixmap used to draw the background of
TrackContentWidgets was only updated on size changes but not on
changes of zoom level in according editor. Fix this by updating
background pixmaps in trackContainerView::setPixelsPerTact().
2009-12-07 01:38:17 +01:00
Armin Kazmi
8e86863a86 AudioPulseAudio: fixed latency and underrun problems
Try to adjust latency of PulseAudio according to our settings of mixer
so it does not have such a bad latency anymore.

Furthermore force PulseAudio to play silence instead of rewinding
streams in case of underruns.
(cherry picked from commit 92047f5e9e)
2009-11-20 23:10:49 +01:00
Tobias Doerffel
5309e7a374 AudioPulseAudio: fixed improper shutdown + free allocated resources
There have been some problems with the threading logic in the
AudioPulseAudio backend resulting in an endless loop when quitting LMMS.

Furthermore allocated PulseAudio resources were not freed properly.
Thanks to Armin Kazmi <armin.kazmi@tu-dortmund.de> for pointing out
this issue.
(cherry picked from commit 168805745e)
2009-11-20 22:36:06 +01:00
Tobias Doerffel
1eb4c31607 SideBar: rewritten to use QToolBar instead of KMultiTabBar
Rewrote implementation of class SideBar to use QToolBar instead of
KMultiTabBar. We can style the SideBar now easily via CSS and do not
have to ship 3rd party KDE code with LMMS. Also the QToolBar based
SideBar integrates much better into the according widget style.

Furthermore renamed SideBar related classes and files to match new
coding style.
(cherry picked from commit 822a22ca37)
2009-10-31 13:38:17 +01:00
Tobias Doerffel
db89dfa181 Removed usage of ASCII C strings in several places
Still QString::toAscii() & friends were used in several places causing
problems such as failed access to files with non-ASCII characters in
name.

Closes #2884115.
(cherry picked from commit 1633cf2593)
2009-10-27 17:59:06 +01:00
Paul Giblock
2b714fd686 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...
(cherry picked from commit 49c2f6bad1)
2009-10-24 17:41:05 +02:00
Paul Giblock
340be43acd 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".
(cherry picked from commit beb92563f1)
2009-10-24 17:37:26 +02:00
Paul Giblock
e959af4ec2 Increase import filter for *.midi and *.riff
Fix song.cpp and translations so the somewhat common *.midi extension is
recognized.
(cherry picked from commit c504bc84d4)
2009-10-24 17:35:16 +02:00
Tobias Doerffel
f7da4a0f7e 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.
(cherry picked from commit 6940d19969)
2009-09-15 23:51:00 +02:00
Paul Giblock
cc1cdfa664 Fix bug 2819817: main window scrollbars
Fix problem with main-window scrollbars not adjusting when toggling
off-screen children.  Seems like Qt bug #260116.
(cherry picked from commit 669b4e7198)
2009-09-15 23:13:43 +02:00
Tobias Doerffel
18a8ffc674 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.
(cherry picked from commit ee63a13f2d)
2009-08-29 00:09:57 +02:00
Tobias Doerffel
5ba1340ed0 Plugin: typedef DescriptorList + more const improvements
Instead of writing QVector<Plugin::Descriptor> everywhere, mix up
iterators etc. centrally define Plugin::DescriptorList and use it
everywhere.

Additionally made pointers to Plugin::Descriptor and
Plugin::Descriptor::SubPluginFeatures::Key const in various places
so we can use ConstIterator everywhere when iterating through
Plugin::DescriptorList.
(cherry picked from commit 2287eca802)
2009-08-29 00:07:05 +02:00
Tobias Doerffel
c2f9fcd14f Plugin::Descriptor: renamed sub_plugin_features to subPluginFeatures
Renamed field sub_plugin_features to subPluginFeatures in
Plugin::Descriptor struct.
(cherry picked from commit e8c3c21f7f)
2009-08-29 00:02:47 +02:00
Tobias Doerffel
fc72b1a6a4 EffectSelectDialog: rewritten using Designer
All of the GUI code of EffectSelectDialog has been replaced by an
according UI file. Also merged EffectListWidget class into
EffectSelectDialog to further simplify logic.
(cherry picked from commit cb85bfc906)
2009-08-29 00:02:20 +02:00
Tobias Doerffel
f4dbb2ff5c sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
(cherry picked from commit 166701f9f3)
2009-08-25 01:42:20 +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
6a8b285932 AutomatableModel: do not return an out of range value in fittedValue()
If a certain step was set for a model, the fitted value (i.e. value
divided by step, rounded and multiplied with step again) could become
smaller than minValue or greater than maxValue. Therefore explicitely
check those cases after performing the described calculation.

Closes #2840202.
(cherry picked from commit b5d9fab944)
2009-08-23 23:43:37 +02:00
Tobias Doerffel
58f2aefece AudioAlsa/AudioOss: set FD_CLOEXEC flag for file descriptors
Per default child processes inherit all file descriptors of their
parent process. This applied for file descriptors pointing to sound
devices as well. Reopening sound devices while e.g. a ZynAddSubFX
process was running always failed due to this "feature".

By manually setting the FD_CLOEXEC flag for the sound device file
descriptors they do not get inherited by child processes anymore.
(cherry picked from commit 80f101cec6)
2009-08-18 23:24:42 +02:00
Tobias Doerffel
c355d71716 MidiAlsaSeq: print error message if snd_seq_event_input() failed
Evaluate return value of snd_seq_event_input() and print an error
message if it failed.
(cherry picked from commit dfae570700)
2009-08-14 15:38:12 +02:00
Tobias Doerffel
0503f5353f ControllerConnectionDialog: improved auto detect feature for controllers
When opening up the ControllerConnectionDialog by default auto detect
is enabled and all MIDI input devices are selected. Upon the first
event all devices but the one the event came from get unchecked. This
eases the process of assigning MIDI controls to software controls.
(cherry picked from commit 27f5d20e05)
2009-08-14 15:38:05 +02:00
Tobias Doerffel
e2b1b5de60 MidiEvent: allow querying name of port which it came from
Added functionality to query the name of the source port of a MidiEvent
by calling MidiClient::sourcePortName( const MidiEvent & ).
(cherry picked from commit 5ec96a9483)
2009-08-14 15:37:57 +02:00
Tobias Doerffel
bf68a565da MidiAlsaSeq: construction of port name in separate function
A port name is constructed from snd_seq_* structures at various places,
therefore separate it into a static helper function. This avoids
redundancy and eases maintainability.
(cherry picked from commit bfe90a8ade)
2009-08-14 15:37:29 +02:00
Tobias Doerffel
d8f9b685b2 MidiAlsaSeq: improved MIDI event polling loop
Use poll() with a finite timeout so we can quit the thread properly
without manually writing stuff into the pipe.

Check for pending events at the beginning of the loop so we can't end up
in an endless loop.

Furthermore check return value of snd_seq_event_input() and get out of
loop if it indicates an error.
(cherry picked from commit 9d811bf080)
2009-08-14 15:37:23 +02:00
Tobias Doerffel
b31a63fd00 MidiAlsaSeq: QString related fixups
Use QString::isEmpty() rather than comparing against an empty string.
Furthermore use QStrin::toUtf8() instead of QString::toAscii() for
retrieving name of a MidiPort.
(cherry picked from commit 295b332650)
2009-08-14 15:37:13 +02:00
Tobias Doerffel
b8ebfbd06a Renamed MIDI and audio related classes/files to match new style
Renamed all MIDI and audio related classes/files to match new style.
Additionally various cleanups.
2009-08-13 00:52:21 +02:00
Peter Nelson
ff7b296db8 AudioJACK: removed incorret JACK transport code
The audio_jack driver currently treats the jack transport status as a
flag for whether or not to output audio. This is incorrect and
unintended usage of jack transport. The attached patch simply removes
all references to jack transport from the driver, so that LMMS will
always be able to produce audio.

Closes #2816029.
(cherry picked from commit 1fe0c689b0)
2009-08-12 11:54:47 +02:00
Tobias Doerffel
57c79759c8 MidiWinMM: added missing break directive after case-block
A break directive was missing in MidiWinMM::handleInputEvent(), leading
to inappropriate calls to qWarning() on pitch bend.
(cherry picked from commit 58023cf2cf)
2009-08-10 13:53:54 +02:00
Paul Giblock
5138ed6722 Rename all Controller-family classes to new style
Adjust capitialization on all Controller-related classes to new
standards and update all calling code
(cherry picked from commit f1d60958f0)
2009-08-09 00:29:16 +02:00
Paul Giblock
9eed60c068 Hotfix for resizable controller rack
Apparently I didn't compile the latest version of my changes and there
was a lurking error.  This has been fixed.
(cherry picked from commit a9a3c796f7)
2009-08-08 18:26:22 +02:00
Paul Giblock
e109f3e550 Make Controller-Rack resizable
Per request, make the Controller-rack vertically sizable.  This is also
part of our effort to slowly deprecate old fixed-positioning code in
favor of layouts.
(cherry picked from commit bb76ba5121)
2009-08-08 10:30:10 +02:00
Tobias Doerffel
93a456c67a MainWindow: removed HQ mode button
Switching to HQ mode in standard workflow doesn't make much sense and
is likely to cause problems. Therefore remove the HQ mode button for
for time being. One can still export projects in high(er) quality.
(cherry picked from commit d66c71ebf8)
2009-08-07 18:58:38 +02:00
Tobias Doerffel
d7df990e6c MidiWinMM: use qWarning() rather than printf()
Using printf() is really old C-style, therefore changed all printf()s
to qWarning()s.
(cherry picked from commit 94c5c5a46f)
2009-08-06 13:48:47 +02:00
Tobias Doerffel
d536d851a4 PianoRoll: removed duplicate function call in testPlayNote()
There's no need to send a MidiNotePanning event twice in
PianoRoll::testPlayNote(). Removed the duplicate function call.
(cherry picked from commit 4cdcd1a670)
2009-08-05 17:19:59 +02:00
Tobias Doerffel
edf2d4d104 Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible

(cherry picked from commit 0bb54199b0)
2009-08-05 17:17:57 +02:00
Tobias Doerffel
f969b7d892 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.

(cherry picked from commit bf8f823751)
2009-08-03 18:57:33 +02:00
Tobias Doerffel
54dadfcf48 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>
(cherry picked from commit cb72bf2260)
2009-07-10 17:50:55 +02:00
Tobias Doerffel
91912e143a 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>
(cherry picked from commit 4f249400ac)
2009-07-09 12:54:14 +02:00
Tobias Doerffel
9b2e3fc262 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>
(cherry picked from commit 1015868e1f)
2009-07-07 21:22:20 +02:00
Tobias Doerffel
d555db6109 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>
(cherry picked from commit cf7539caaf)
2009-07-07 10:49:09 +02:00
Tobias Doerffel
f50d5ce943 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>
(cherry picked from commit 2ef5dffec0)
2009-07-07 01:59:14 +02:00
Tobias Doerffel
3c80a079a2 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>
(cherry picked from commit fb58dc00ab)
2009-07-07 01:59:04 +02:00
Tobias Doerffel
8fd507bcff 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>
(cherry picked from commit 33ce491caf)
2009-07-07 01:58:44 +02:00
Tobias Doerffel
facab0c2d8 AutomationEditor: set pen for painter outside inner loop
Set pen for drawing automation pattern outside of inner loop. This
might save some CPU cycles.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit ddf3d3dc66)
2009-06-22 22:14:03 +02:00
Tobias Doerffel
c222c062c5 PianoRoll: fixed crash with detune tool
When clicking at an invalid position with the detune tool, LMMS could
crash as an invalid iterator was referenced (closes #2808589).

Furthermore renamed PianoRoll::ModeOpen to PianoRoll::ModeEditDetuning.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 9ca93040de)
2009-06-18 23:33:21 +02:00
Tobias Doerffel
7a632277b8 Renamed type noteVector to NoteVector
Renamed type noteVector to NoteVector as well as ::iterator to
::Iterator and ::const_iterator to ::ConstIterator.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit e12476f79c)
2009-06-18 23:32:32 +02:00
Tobias Doerffel
87e44aa241 Pattern: properly advance iterator when removing notes
We must not keep the iterator at the same position when erasing notes
from the m_notes array. This usually is not a problem when using QVector
but we might switch to QList somewhen later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 2d5dfc7b15)
2009-06-18 23:07:43 +02:00
Tobias Doerffel
0098ff874a NotePlayHandle: fixed crash at playback of subnotes
Commit 08ea133aa2 uncovered a flaw in
NotePlayHandle::play(...). When iterating over subnotes for each subnote
after playing it, we check whether it is finished. If this is true, the
according subnote gets erased from the m_subNotes array. However we have
to set the subnote iterator to what QList::erase(...) returns instead of
keeping it where it was before. This accidentally worked when using
QVector as type for NotePlayHandle arrays but caused a crash now that
we're using QList.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 0d6ba6291b)
2009-06-18 23:07:31 +02:00