--- lmms-0.4.2.orig/debian/menu +++ lmms-0.4.2/debian/menu @@ -0,0 +1,4 @@ +?package(lmms):needs="X11" section="Applications/Sound" \ + title="LMMS" hints="Audio" command="/usr/bin/lmms" \ + longtitle="Linux MultiMedia Studio" \ + icon32x32="/usr/share/pixmaps/lmms.xpm" --- lmms-0.4.2.orig/debian/control +++ lmms-0.4.2/debian/control @@ -0,0 +1,56 @@ +Source: lmms +Section: sound +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Patrick Winnertz +Build-Depends: debhelper (>= 6), cmake, libsdl1.2-dev, libsamplerate0-dev, libsndfile1-dev, libvorbis-dev, libogg-dev, libqt4-dev, qt4-dev-tools, libjack-dev, libstk0-dev, ladspa-sdk, wine-dev [i386], wine-dev [amd64], libasound2-dev, imagemagick, libfluidsynth-dev, portaudio19-dev, libpulse-dev, libfftw3-dev, quilt +Standards-Version: 3.7.3 +Homepage: http://lmms.sourceforge.net/ + +Package: lmms +Architecture: any +Depends: lmms-common (= ${source:Version}) , ${shlibs:Depends}, stk +Recommends: tap-plugins, caps +Suggests: fil-plugins, mcp-plugins, omins, vcf, freepats +Description: Linux Multimedia Studio + LMMS is a free cross-platform alternative to commercial programs like + FL Studio(R), which allow you to produce music with your computer. + This includes the creation of melodies and beats, the synthesis and mixing + of sounds, and arranging of samples. You can have fun with your MIDI-keyboard + and much more; all in a user-friendly and modern interface. + +Package: lmms-common +Architecture: all +Description: Linux Multimedia Studio - common files + LMMS is a free cross-platform alternative to commercial programs like + FL Studio(R), which allow you to produce music with your computer. + This includes the creation of melodies and beats, the synthesis and mixing + of sounds, and arranging of samples. You can have fun with your MIDI-keyboard + and much more; all in a user-friendly and modern interface. + . + This package contains the platform independent files such as samples, presets + and some example projects. + +Package: lmms-dev +Architecture: any +Depends: libqt4-dev, libsamplerate0-dev, ladspa-sdk, libfftw3-dev +Description: Linux Multimedia Studio - development files + LMMS is a free cross-platform alternative to commercial programs like + FL Studio(R), which allow you to produce music with your computer. + This includes the creation of melodies and beats, the synthesis and mixing + of sounds, and arranging of samples. You can have fun with your MIDI-keyboard + and much more; all in a user-friendly and modern interface. + . + This package contains development files needed for compiling separate plugins. + +Package: lmms-vst +Architecture: i386 +Depends: lmms-common (= ${source:Version}), ${shlibs:Depends}, wine +Description: Linux Multimedia Studio - VST support + LMMS is a free cross-platform alternative to commercial programs like + FL Studio(R), which allow you to produce music with your computer. + This includes the creation of melodies and beats, the synthesis and mixing + of sounds, and arranging of samples. You can have fun with your MIDI-keyboard + and much more; all in a user-friendly and modern interface. + . + This package contains the files needed for lmms to work with VST plugins. --- lmms-0.4.2.orig/debian/lmms.install +++ lmms-0.4.2/debian/lmms.install @@ -0,0 +1,24 @@ +usr/bin/lmms +usr/li*/lmms/libflpimport.so +usr/li*/lmms/libsf2player.so +usr/li*/lmms/libbitinvader.so +usr/li*/lmms/libstereomatrix.so +usr/li*/lmms/libmidiimport.so +usr/li*/lmms/libmalletsstk.so +usr/li*/lmms/liblb302.so +usr/li*/lmms/libvibedstrings.so +usr/li*/lmms/liborganic.so +usr/li*/lmms/libspectrumanalyzer.so +usr/li*/lmms/libkicker.so +usr/li*/lmms/libpatman.so +usr/li*/lmms/libstereoenhancer.so +usr/li*/lmms/libladspaeffect.so +usr/li*/lmms/libladspabrowser.so +usr/li*/lmms/libpapu.so +usr/li*/lmms/libaudiofileprocessor.so +usr/li*/lmms/libbassbooster.so +usr/li*/lmms/libtripleoscillator.so +usr/li*/lmms/libsid.so +usr/li*/lmms/libpeakcontrollereffect.so +usr/li*/lmms/ladspa/ +usr/share/man/ --- lmms-0.4.2.orig/debian/lmms-common.postrm +++ lmms-0.4.2/debian/lmms-common.postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi + +#DEBHELPER# --- lmms-0.4.2.orig/debian/changelog +++ lmms-0.4.2/debian/changelog @@ -0,0 +1,308 @@ +lmms (0.4.2-0ubuntu5) jaunty; urgency=low + + * debian/control: Remove references to libwine-dev, since it is replaced by + wine-dev. + * Break out VST support files into a new package, lmms-vst. This will ensure + that lmms doesn't break on systems where wine is not installed. + * Add quilt to build depends. + * Patches from upstream, fixing various issues already fixed in the newer + upstream version, thanks to Tobias Doerffel + for sending these patches: + - 0001-in-FL_EffectChannel-initialize-isMuted-member-fixe.patch + - 0003-stable-backport-of-various-fixes-from-trunk.patch + - 0004-reworked-mixer-threads-synchronization-realization.patch + - 0005-fixed-bug-you-can-use-shift-left-to-move-notes-past.patch + - 0006-simplified-formulas-for-calculating-envelope-array-r.patch + - 0009-better-workaround-for-optimizer-bug-in-GCC-4.3-s.patch + - 0010-integrated-pitanga-s-patch-to-fix-unquantized-BB-dra.patch + - 0012-do-not-load-samples-bigger-than-100-MB-closes-2458.patch + - 0013-ensure-cursor-is-never-NULL-when-painting-it-in-pai.patch + - 0014-update-patch-after-loading-settings-closes-2486372.patch + - 0016-various-UI-related-backports-from-trunk.patch + - 0017-fix-distorted-widgets-everywhere-with-qt45.patch + - 0018-disable-output-monitor-per-default-and-show-click-hi.patch + - 0020-integrated-latest-libsamplerate-0.1.6-which-is-bot.patch + - 0021-fix-misloaded-samples.patch + - 0022-fix-lockup-when-freezing-patterns.patch + - 0023-reverted-rev-2037-as-we-have-custom-changes-in-this.patch + - 0029-make-sure-all-buttons-in-trackOperationsWidget-have.patch + - 0034-added-copy-constructor-implementation-for-AtomicInt.patch + - 0040-PeakController-always-check-for-m_peakEffect-NUL.patch + - 0042-NotePlayHandle-call-instrumentTrack-deleteNotePlug.patch + - 0044-MidiImport-per-default-use-bank-0-instead-of-128.patch + - 0045-PatternView-if-volume-of-a-step-is-95-it-was-not-po.patch + - 0046-TrackContainerView-when-dragging-a-preset-file-into.patch + - 0047-PeakControllerEffect-corrected-calculation-for-RMS.patch + - 0048-MidiPort-properly-emit-portChanged-signals-when-loa.patch + - 0049-MIDI-subsystem-fixed-misspelled-writeable-into-w.patch + - 0050-AutomationPattern-save-and-restore-length-of-Automa.patch + - 0052-FX-Fader-added-accessibleName-property-for-FX-fader.patch + - 0054-MidiAlsaSeq-fixed-typo-which-made-output-ports-not.patch + - 0055-MidiPort-subscribe-writable-rather-than-readable-po.patch + - 0058-AutomationPatternView-fixed-painting-of-automation.patch + - 0060-MidiImport-fixed-mistransposed-notes.patch + - 0061-LadspaEffect-fixed-controller-connections-on-sample.patch + - 0062-Oscillator-fixed-samplerate-dependence-of-FM-PM.patch + - 0064-RemoteVstPlugin-use-SplittedThreading-model-for-MDA.patch + - 0065-Oscillator-reverted-recent-fix-for-PM.patch + - 0066-VstEffect-set-displayName-property-at-initializatio.patch + + -- Luke Yelavich Mon, 30 Mar 2009 14:45:23 +1100 + +lmms (0.4.2-0ubuntu4) jaunty; urgency=low + + * debian/control: fix bad syntax for wine's architectures. + + -- Luke Yelavich Wed, 25 Mar 2009 10:39:18 +1100 + +lmms (0.4.2-0ubuntu3) jaunty; urgency=low + + * debian/control: Demote wine from Recommends to suggests, as we really + don't want it on the studio DVDs, and blacklisting in the seeds is + causing unexpected behavior. Blacklisting wine is also not the + recommended approach. + + -- Luke Yelavich Wed, 25 Mar 2009 09:28:56 +1100 + +lmms (0.4.2-0ubuntu2) jaunty; urgency=low + + * debian/control: Move wine from depends to recommends. We want lmms on the + UbuntuStudio disks, however we don't want to promote the use of + proprietary/VST plugins, which is what wine is for. + + -- Luke Yelavich Wed, 18 Mar 2009 18:06:50 +1100 + +lmms (0.4.2-0ubuntu1) jaunty; urgency=low + + * New upstream release (LP: #306974, LP: #126026) + * Dropped patches as merged by upstream: + - fix-crash-sample_track.dpatch + - remove-upstream-menu.dpatch + * Removed build-dep dpatch + * Updated build rules to work with cmake-based build system of LMMS 0.4.x + * Updated build dependencies of new upstream version + * Package correct library directory in 64 bit version + * Package installed headers into lmms-dev + * Updated copyrights to reflect recent contributions to upstream + * Removed dependency libqt3-i18n as LMMS is Qt4 based and libqtcore4 ships + required files + * Bumped required version of debhelper from 5 to 6 + + -- Tobias Doerffel Thu, 03 Feb 2009 14:05:36 +0100 + +lmms (0.3.2-1ubuntu2) intrepid; urgency=low + + * Change wine-bin back to wine in depends, as the packages are only split + in Debian (LP: #254501). + + -- James Westby Sun, 03 Aug 2008 22:14:06 +0100 + +lmms (0.3.2-1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Remove libwine-dev alternative in the Build-Depends. + - Update maintainer field as per spec. + + -- Luke Yelavich Sun, 18 May 2008 22:02:58 +0200 + +lmms (0.3.2-1) unstable; urgency=low + + * Decrease wine dependency to wine-bin as suggested. (Closes: #446163) + * Acknowlegded NMU from Pierre Habouzit in order to + fix FTBFS with gcc-4.3 which (Closes: #462202) + * Now including the singerbot plugin. (Closes: #443224) + * Add patch to prevent lmms from crashing. + + -- Patrick Winnertz Mon, 17 Mar 2008 10:56:12 +0100 + +lmms (0.3.1-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Add g++-4.3.patch to fix g++-4.3 FTBFS (Closes: 462202). + + -- Pierre Habouzit Sun, 16 Mar 2008 23:21:56 +0000 + +lmms (0.3.1-1ubuntu2) hardy; urgency=low + + * Several patches from upstream, as follows: (LP: #204017) + - fix-dummy-plugin-implementations.diff: + + if a certain kind of plugin could not be found, a dummy plugin is + being loaded. Fix segfault. + - fix-effect-bugs.diff: + + fixed wrong SIGNAL/SLOT-connection resulting in broken gate-knob. + + made effect-move-up feature actually work. + + do not crash when removing sample-tracks with effects inside. + - fix-midi-import.diff: + + use Patman-plugin (which plays MIDI-patch-files) as default-instrument + when importing MIDI-files to make the imported project actually sound + like it should. + - fix-piano-roll.diff: + + fixed key-pressure-MIDI-event while changing volume of a note. + + improved painting of volume-lines + - fix-track-removal.diff: + + when removing all tracks, remove from last to first track to + significantly improve speed. + - fix-vst-gui.diff: + + VeSTige-plugin is broken with recent WINE-versions (i.e. the ones + found in hardy) - patch fixes usage of Win32-VST-GUI. + - fix-wiki-url.diff: + + the Wiki with help, manual etc. has been moved - reflect this change + in program/help-menu. + - fix-gate-for-effects.diff: + + effect-processing never stops for any kind of effects because of wrong + silence-detection-code. + + -- Luke Yelavich Wed, 09 Apr 2008 23:39:12 +1000 + +lmms (0.3.1-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - Remove libwine-dev alternative in the Build-Depends. + - Update maintainer field as per spec. + + -- Luke Yelavich Thu, 13 Dec 2007 15:18:02 +1100 + +lmms (0.3.1-1) unstable; urgency=low + + * Packaging new upstream release. + * Install Upstream Changelog (Closes: #441477) + Thanks to Felipe Sateler + * Lowered the caps dependency to Recommends (Closes: #446163) + * Added -i/-a to the build targets in rules in order to make sure that only + (in)dep packages are build. + * Changed my maintainer address + * Added patch to remove stereo_enhancer plugin which has a ftbfs with gcc + 4.2.3 + * Added imagemagick as build-dep since we have to convert a .png to a .xpm + via convert + * Doesn't install upstreams menu file, since it's outdated.. instead use + our own. + * Standard-Version bump to 3.7.3 + * Remove Homepage field from Description and create a own Header + * Added postinst and postrm for lmms-common to call update-menu if available + (this has to be done manually, since we doesn't use dh_installmenu to install + the menu file) + + -- Patrick Winnertz Thu, 06 Dec 2007 07:08:04 +0100 + +lmms (0.3.0-1ubuntu3) gutsy; urgency=low + + * Added patch from tobydox. Fixes various random crashes. + (LP: #145608) + + -- Chuck Short Wed, 03 Oct 2007 20:52:22 -0400 + +lmms (0.3.0-1ubuntu2) gutsy; urgency=low + + * Remove libwine-dev alternative in the Build-Depends. + + -- Steve Kowalik Tue, 25 Sep 2007 00:39:42 +1000 + +lmms (0.3.0-1ubuntu1) gutsy; urgency=low + + * Resynchronized with Debian (LP: #139759, LP: #90806, LP: #102639, + LP: #113447, LP: #121172, LP: #124890) + * reverted changes from 0.2.1-1.1ubuntu1 as upstream merged/included them + + -- Tobias Doerffel Mon, 17 Sep 2007 15:00:24 +0200 + +lmms (0.3.0-1) unstable; urgency=low + + [ Tobias Doerffel ] + * New upstream release. (Closes: #439301) + * Removed patch from Thomas Girard as upstream merged changes + + [ Patrick Winnertz ] + * Moved manpage into correct package (lmms) + * Removed manuall installation of Upstream Changelog, thanks to the power of + debhelper ;-) + * FTBFS with gcc 4.2 is fixed by upstream (Closes: #383295) + * lmms has now a proper menu entry (Closes: #383406) + * lmms depends now on the same version of lmms-common (Closes: #389037) + * fixed by upstream: arpeggio status is now saved (Closes: #433262) + * Added build-depends libqt3-i18n (Closes: #384406) + * Added watch file for lmms (Closes: #439302) + Thanks to Raphael Geissert + * Improved copyright file + * Doesn't build libsingerbot since it is experimental and doesn't work + correct yet + * Added several build-dependencys (libstk0-dev, libestools1.2-dev, ladspa-sdk, + libflac-dev, libwine-dev [i386], libqt3-i18n, libasound2-dev, + festival-dev, dpatch ) + * Take over this package from Florian Ragwitz, so set myself as maintainer + * Add a depends on a specific version of lmms-common + * Added several new dependencys to lmms + * Improved description of lmms and lmms-common + * Die on errors of clean, but don't die if the makefile doesn't exist + * Added watch file + + -- Patrick Winnertz Fri, 24 Aug 2007 08:23:34 +0200 + +lmms (0.2.1-1.1ubuntu1) gutsy; urgency=low + + * Added .desktop file (LP: #134899) + * Provided an icon + * Update maintainer per spec + + -- Mario Bonino Sun, 26 Aug 2007 19:32:35 +0200 + +lmms (0.2.1-1.1) unstable; urgency=high + + * Non-maintainer Upload + * Add Patch by Thomas Girard for segfault right after + lmms starting up (Closes: 382491) + + -- Michael Ablassmeier Tue, 5 Sep 2006 12:00:40 +0200 + +lmms (0.2.1-1) unstable; urgency=low + + * New upstream release. + * Bump up Standards-Version to 3.7.2 (no changes). + * Use DH_COMPAT 5. + + -- Florian Ragwitz Sun, 13 Aug 2006 14:40:13 +0200 + +lmms (0.1.4-1) unstable; urgency=low + + * New upstream release. + + -- Florian Ragwitz Sat, 4 Feb 2006 07:16:47 +0100 + +lmms (0.1.3-1) unstable; urgency=low + + * New upstream release. + * debian/lmms.1 was included by upstream. Removed it from debian/. + * Install lmms.1 in lmms-common instead of lmms to safe some mirror space. + * Added a lintian override for the above, as lintian is not smart enough to + check for manpages in other packages from the same source package on which + a package with a missing manpage depends. + + -- Florian Ragwitz Wed, 1 Feb 2006 18:28:42 +0100 + +lmms (0.1.2-1) unstable; urgency=low + + * New upstream release. + + -- Florian Ragwitz Thu, 22 Dec 2005 16:22:50 +0100 + +lmms (0.1.1-2) unstable; urgency=low + + * lmms-common doesn't depend on lmms anymore to remove a circular + dependencies (Closes: #339906). + + -- Florian Ragwitz Sun, 20 Nov 2005 12:27:08 +0100 + +lmms (0.1.1-1) unstable; urgency=low + + * New upstream release. + * Changed Maintainer address. + * Added libjack-dev to Build-Depends. + + -- Florian Ragwitz Mon, 31 Oct 2005 10:48:36 +0100 + +lmms (0.0.9+0.1.0rc1-1) unstable; urgency=low + + * Initial Release (Closes: #315976). + + -- Florian Ragwitz Fri, 22 Jul 2005 16:33:17 +0200 + --- lmms-0.4.2.orig/debian/lmms-common.install +++ lmms-0.4.2/debian/lmms-common.install @@ -0,0 +1,3 @@ +usr/share/applications/* +usr/share/lmms/* +usr/share/mime/* --- lmms-0.4.2.orig/debian/lmms.xpm +++ lmms-0.4.2/debian/lmms.xpm @@ -0,0 +1,226 @@ +/* XPM */ +static char *lmms[] = { +/* columns rows colors chars-per-pixel */ +"32 32 188 2", +" c #050405", +". c #090909", +"X c #131413", +"o c #1E1E1E", +"O c #1B241B", +"+ c #362C00", +"@ c #242323", +"# c #272E27", +"$ c #2B2A2B", +"% c #333433", +"& c #373A37", +"* c #383638", +"= c #3C3D3C", +"- c #185118", +"; c #047A04", +": c #257A25", +"> c #377D37", +", c #5A4A00", +"< c #635100", +"1 c #685500", +"2 c #745F00", +"3 c #756203", +"4 c #7E6600", +"5 c #403F40", +"6 c #395144", +"7 c #434243", +"8 c #424A42", +"9 c #4C4B4C", +"0 c #4A554A", +"q c #535353", +"w c #505850", +"e c #5B5B5B", +"r c #636363", +"t c #6D6D6D", +"y c #746F73", +"u c #727272", +"i c #7D7D7D", +"p c #8E7400", +"a c #917600", +"s c #967A00", +"d c #9A7E00", +"f c #039903", +"g c #0B9E0B", +"h c #158615", +"j c #1A931A", +"k c #00A300", +"l c #00AB00", +"z c #0FA70F", +"x c #00B500", +"c c #00BC00", +"v c #08B108", +"b c #08BC08", +"n c #17A617", +"m c #19A919", +"M c #14BF14", +"N c #18B718", +"B c #1BBD1B", +"V c #228C22", +"C c #249424", +"Z c #259925", +"A c #289B28", +"S c #308030", +"D c #2CA22C", +"F c #24B224", +"G c #26BB26", +"H c #30A630", +"J c #3DA83D", +"K c #32B232", +"L c #3DB33D", +"P c #3ABD3A", +"I c #02C302", +"U c #02CB02", +"Y c #01D201", +"T c #03DC03", +"R c #13C713", +"E c #16D816", +"W c #00E400", +"Q c #00E900", +"! c #24CF24", +"~ c #29C229", +"^ c #2CC82C", +"/ c #33C133", +"( c #37CD37", +") c #3CC13C", +"_ c #32D032", +"` c #2DEA2D", +"' c #3EE53E", +"] c #499449", +"[ c #43A743", +"{ c #46AC46", +"} c #54B654", +"| c #5EBF5E", +" . c #4EC54E", +".. c #4ACB4A", +"X. c #44D244", +"o. c #54C954", +"O. c #5CCC5C", +"+. c #50D450", +"@. c #56DA56", +"#. c #5DD15D", +"$. c #44E144", +"%. c #62C462", +"&. c #66CC66", +"*. c #6EC06E", +"=. c #68CC68", +"-. c #64D164", +";. c #69DE69", +":. c #74C674", +">. c #70CB70", +",. c #74D274", +"<. c #75DA75", +"1. c #7DD27D", +"2. c #62E562", +"3. c #9D8000", +"4. c #AB8B00", +"5. c #B08F00", +"6. c #B29101", +"7. c #B99600", +"8. c #BD9A00", +"9. c #C29E00", +"0. c #C4A100", +"q. c #CAA500", +"w. c #CCA800", +"e. c #D4AD00", +"r. c #0055C5", +"t. c #0058CE", +"y. c #0058D0", +"u. c #0067CE", +"i. c #0068CF", +"p. c #0075CF", +"a. c #006AD3", +"s. c #0077D1", +"d. c #0079D5", +"f. c #868686", +"g. c #888887", +"h. c #8C8C8C", +"j. c #908F90", +"k. c #949494", +"l. c #9A9999", +"z. c #A2A2A2", +"x. c #A9AAA8", +"c. c #A5B1A5", +"v. c #B4B4B4", +"b. c #B3BFB2", +"n. c #BFBFBF", +"m. c #80D480", +"M. c #8BD98B", +"N. c #91D191", +"B. c #98D098", +"V. c #9CDB9B", +"C. c #93E193", +"Z. c #AAC4A9", +"A. c #AAC9AA", +"S. c #A0DCA0", +"D. c #A8D6A8", +"F. c #AADEAA", +"G. c #B4C2B3", +"H. c #B6CAB5", +"J. c #BAC1B9", +"K. c #B5DEB5", +"L. c #A4EAA4", +"P. c #A8E1A8", +"I. c #ABEDAB", +"U. c #A7F6A7", +"Y. c #AFF2AF", +"T. c #B3E2B3", +"R. c #BBE4BB", +"E. c #BDEBBD", +"W. c #B6F3B6", +"Q. c #B9F4B9", +"!. c #C0C4BF", +"~. c #C6C6C6", +"^. c #C7CFC7", +"/. c #C9C9C9", +"(. c #C4E6C4", +"). c #C6EBC6", +"_. c #CBEBCB", +"`. c #C4F1C4", +"'. c #CBF3CB", +"]. c #DBE4DB", +"[. c #D2F1D2", +"{. c #D0F8D0", +"}. c #DCF4DC", +"|. c #E2EFE2", +" X c #E1F4E1", +".X c #E2F9E2", +"XX c #EAF5EA", +"oX c None", +/* pixels */ +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoX{ oXoXoXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXK.B.A oXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXR.XXF.} oXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXR.}.}._.V.=.K oXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXZ P.E.T.'.'.`.I.<.F oXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXA F.*.H ,.C.L.I.W.;.oXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXH V.&.oXoXm G P .@.B oXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXD M.=.oXoXoXoXoXoXoXf oXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXC 1.-.oXoXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXq e e e e e > =.#.V oXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoX7 9 9 q oXoXoXoX: o.+.j 8 7 oXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoX% * oXoXoXoXoXoXoXoX) X.v oX* % oXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXo oXoXoXoXoXoXoXoXoXoXF _ I oXoXoXo oXoXoXoXoXoXoX", +"oXoXoXoXoXoX@ oXoXoXoXoXoXoXoXoXoXoXz R U l oXoXoXo oXoXoXoXoXoX", +"oXoXoXoXoXf.oXoXoXoXoXoXoXoXoXoXoXoXoXx Y c oXoXoXoXh.oXoXoXoXoX", +"oXoXoXoXoXx.oXoXoXoXoXoXoXoXJ *.1.M.1.+.E U oXoXoXoXg.oXoXoXoXoX", +"oXoXoXoXoXoXoXi oXoXoXoX[ N.)..X X].|..XW.$.z oXk.oXoXoXoXoXoXoX", +"oXoXoXoXoXoX~.r q oXoX} P._._._.b.x.^.[.{.U.L w t /.oXoXoXoXoXoX", +"s.oXoXoXz.~.l.9 9 oX{ S.A.c.G.K.J.y Z.2.' ` G 0 9 l.v.z.oXoXoXi.", +"s.oXoXoXh.x.y 5 = > 1.N.G.l.~.F.M.m.X.Y W Q N 8 = t z.g.oXoXoXa.", +"s.oXoXoXi l.e % % ] 1.1.F.H.V...~ .:.~ W Q n & % e l.u oXoXoXa.", +"d.oXoXoXq k.0 $ # ] -.-.-.%.| :.F.).E.( W Q h $ $ 9 k.9 oXoXoXa.", +"s.oXy.oX@ l.q o O V ) ^ M L F.W.'.Q.(.! Q Y - @ o r l.@ oXt.oXa.", +"d.oXr.oX@ v.i X X ; x x c b %._.XX(.O.T U oXoXX X g.v.o oXr.oXa.", +"d.oXoXoXoXoXv.@ oXk x I U I / ..^ U c oXoXoX. $ n.oXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXf l x I c c x oXoXoXoXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoX", +"oXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoXoX6 oXoX", +"oXoX6.6.oXoXoXoX4.e.3.oXd e.6.oXoXe.9.oXoX9.e.oXp 0.s p a 3 oXoX", +"oXoX9.0.oXoXoXoXe.6.q.6.w.6.e.oX6.w.7.9.8.7.w.6.oXd p p p 4.oXoX", +"oXoXs 4.4 4 , , 4.oXs 7.s oX4.< a d oX4.6.oXs d + 1 2 2 4 4.oXoX" +}; --- lmms-0.4.2.orig/debian/rules +++ lmms-0.4.2/debian/rules @@ -0,0 +1,97 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +debian/lmms.xpm: data/themes/default/icon.png + convert -resize 32 $< $@ + + +config.status: configure + dh_testdir + mkdir -p cmakebuild + cd cmakebuild && CFLAGS="$(CFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWANT_CAPS:BOOL=OFF -DWANT_TAP:BOOL=OFF + +build: build-stamp +build-stamp: patch config.status + dh_testdir + cd cmakebuild && $(MAKE) + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf cmakebuild + dh_clean + +install: build debian/lmms.xpm + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cd cmakebuild && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + rm -f $(CURDIR)/debian/tmp/usr/share/menu/lmms + install -D -m 644 debian/lmms.xpm debian/lmms-common/usr/share/pixmaps/lmms.xpm + install -D -m 644 debian/menu debian/lmms-common/usr/share/menu/lmms + dh_install -plmms --sourcedir=$(CURDIR)/debian/tmp + dh_install -plmms-common --sourcedir=$(CURDIR)/debian/tmp + dh_install -plmms-dev --sourcedir=$(CURDIR)/debian/tmp +ifeq (i386,$(DEB_HOST_ARCH)) + dh_install -plmms-vst --sourcedir=$(CURDIR)/debian/tmp +endif + dh_installdirs + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i ChangeLog + dh_installdocs -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installchangelogs -a + dh_installdocs -a + dh_installman -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -plmms + dh_gencontrol -plmms-dev +ifeq (i386,$(DEB_HOST_ARCH)) + dh_gencontrol -plmms-vst +endif + dh_md5sums -a + dh_builddeb -plmms + dh_builddeb -plmms-dev +ifeq (i386,$(DEB_HOST_ARCH)) + dh_builddeb -plmms-vst +endif + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- lmms-0.4.2.orig/debian/dirs +++ lmms-0.4.2/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin --- lmms-0.4.2.orig/debian/docs +++ lmms-0.4.2/debian/docs @@ -0,0 +1,2 @@ +README +TODO --- lmms-0.4.2.orig/debian/lmms-vst.install +++ lmms-0.4.2/debian/lmms-vst.install @@ -0,0 +1,5 @@ +usr/li*/lmms/remote_vst_plugin +usr/li*/lmms/libvestige.so +usr/li*/lmms/libvstbase.so +usr/li*/lmms/libvsteffect.so +usr/li*/lmms/remote_vst_plugin.exe.so --- lmms-0.4.2.orig/debian/watch +++ lmms-0.4.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/lmms/lmms-(.*)\.tar\.bz2 --- lmms-0.4.2.orig/debian/copyright +++ lmms-0.4.2/debian/copyright @@ -0,0 +1,70 @@ +This package was debianized by Florian Ragwitz on +Thu, 14 Apr 2005 13:24:57 +0200. + +It was downloaded from http://lmms.sf.net/ + +Copyright Holder: + + Copyright (c) 2004-2008 Tobias Doerffel + Copyright (c) 2006-2008 Paul Giblock + Copyright (c) 2006-2007 Javier Serrano Polo + Copyright (c) 2008 Andrew Kelley + Copyright (c) 2005-2007 Danny McRae + +License: + +All files not listed excplizitly in this file are licensed under the GPLv2 or later. + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License version 2 or later as published by the Free +Software Foundation. + +Files listed here are licensed under GPLv2 or later but not copyrighted by one of the 3 +authors above: + +./plugins/flp_import/unrtf/ + Copyright: 2000,2001,2004 by Zachary Smith + +./plugins/bit_invader/ +./plugins/vibed/ +./plugins/organic/ + Copyright: (c) 2006-2007 Andreas Brandmaier + +./plugins/ladspa_effect/caps/ + Copyright: 2002-5 Tim Goetze + +./plugins/lb302/ + Copyright: (c) 2006-2007 Paul Giblock + +./src/3rdparty/samplerate/ + Copyright: 2002-2004 Erik de Castro Lopo + +Additional to this these copyrights apply: + + - Zolo + + theme "Blue Scene" + + - Sebastian Tilsch + + recording of many samples + + - gabriel + + additional artwork + +On Debian GNU/Linux systems, the complete text of the GNU General Public License +can be found in `/usr/share/common-licenses/GPL-2'. + +================================================================================= +Files listed here are licens under the LGPL-2: + + +./include/ladspa-1.1.h + Copyright: 2000-2002 Richard W.E. Furse, Paul Barton-Davis + +./include/kmultitabbar.h + Copyright: : 2001,2002,2003 by Joseph Wenninger + +On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License +can be found in `/usr/share/common-licenses/LGPL-2'. --- lmms-0.4.2.orig/debian/lmms-dev.install +++ lmms-0.4.2/debian/lmms-dev.install @@ -0,0 +1 @@ +usr/include/lmms/* --- lmms-0.4.2.orig/debian/compat +++ lmms-0.4.2/debian/compat @@ -0,0 +1 @@ +6 --- lmms-0.4.2.orig/debian/lmms-common.postinst +++ lmms-0.4.2/debian/lmms-common.postinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then + update-menus +fi + +#DEBHELPER# --- lmms-0.4.2.orig/debian/patches/0060-MidiImport-fixed-mistransposed-notes.patch +++ lmms-0.4.2/debian/patches/0060-MidiImport-fixed-mistransposed-notes.patch @@ -0,0 +1,29 @@ +From 844aba46b0f0c381c47d9a60de2d02de8538f374 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Wed, 18 Mar 2009 00:01:23 +0100 +Subject: [PATCH] MidiImport: fixed mistransposed notes + +When importing MIDI files notes were always mistransposed by 9 semitones. +This commit fixes correction of notes' keys so imported MIDI files sound +just like they should. +(cherry picked from commit 617def002b33ed8001f881a084356c4b6b86c601) +--- + plugins/midi_import/midi_import.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/plugins/midi_import/midi_import.cpp b/plugins/midi_import/midi_import.cpp +index e5ad69c..820943c 100644 +--- a/plugins/midi_import/midi_import.cpp ++++ b/plugins/midi_import/midi_import.cpp +@@ -367,7 +367,7 @@ bool midiImport::readSMF( trackContainer * _tc ) + + note n( noteEvt->get_duration() * ticksPerBeat, + noteEvt->get_start_time() * ticksPerBeat, +- noteEvt->get_identifier() - 3, ++ noteEvt->get_identifier() - 12, + noteEvt->get_loud()); + ch->addNote( n ); + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0062-Oscillator-fixed-samplerate-dependence-of-FM-PM.patch +++ lmms-0.4.2/debian/patches/0062-Oscillator-fixed-samplerate-dependence-of-FM-PM.patch @@ -0,0 +1,53 @@ +From a850c1dd43d8ff75c24baa32233860fd273b9047 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sat, 21 Mar 2009 10:20:32 +0100 +Subject: [PATCH] Oscillator: fixed samplerate dependence of FM/PM + +When doing FM/PM, the value of sub-oscillator is globally/locally added to +phase. However when doing this, a ratio between fixed default samplerate and +actual samplerate needs to be taken into account in the phase calculation. + +This commit fixes missounding render output when rendering projects with +FM/PM inside at higher samplerates. (Thanks to Skiessi for his ladspa2.mmpz +which clearly brought up this bug) +(cherry picked from commit acaaea82046df9c9f7cc3dab792f809b7cd4753e) +--- + src/core/oscillator.cpp | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/core/oscillator.cpp b/src/core/oscillator.cpp +index bf47d1c..7bbdeca 100644 +--- a/src/core/oscillator.cpp ++++ b/src/core/oscillator.cpp +@@ -375,10 +375,13 @@ void oscillator::updatePM( sampleFrame * _ab, const fpp_t _frames, + m_subOsc->update( _ab, _frames, _chnl ); + recalcPhase(); + const float osc_coeff = m_freq * m_detuning; ++ const float sampleRateCorrection = 44100.0f / ++ engine::getMixer()->processingSampleRate(); + + for( fpp_t frame = 0; frame < _frames; ++frame ) + { +- _ab[frame][_chnl] = getSample( m_phase + _ab[frame][_chnl] ) ++ _ab[frame][_chnl] = getSample( m_phase + ++ _ab[frame][_chnl]*sampleRateCorrection ) + * m_volume; + m_phase += osc_coeff; + } +@@ -457,10 +460,12 @@ void oscillator::updateFM( sampleFrame * _ab, const fpp_t _frames, + m_subOsc->update( _ab, _frames, _chnl ); + recalcPhase(); + const float osc_coeff = m_freq * m_detuning; ++ const float sampleRateCorrection = 44100.0f / ++ engine::getMixer()->processingSampleRate(); + + for( fpp_t frame = 0; frame < _frames; ++frame ) + { +- m_phase += _ab[frame][_chnl]; ++ m_phase += _ab[frame][_chnl] * sampleRateCorrection; + _ab[frame][_chnl] = getSample( m_phase ) * m_volume; + m_phase += osc_coeff; + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0054-MidiAlsaSeq-fixed-typo-which-made-output-ports-not.patch +++ lmms-0.4.2/debian/patches/0054-MidiAlsaSeq-fixed-typo-which-made-output-ports-not.patch @@ -0,0 +1,32 @@ +From 8bfcadfcaffe2b7920f100c39894412e49a5645d Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sat, 14 Mar 2009 19:06:43 +0100 +Subject: [PATCH] MidiAlsaSeq: fixed typo which made output ports not work at all + +As of 94d13e84cab0a79912bb92d2f92f0d18ed0d647a, MidiClients::writablePorts() +was not overloaded properly anymore and thus no output ports appeared anymore. +(cherry picked from commit fdc065b8b87126443440c759fdb7bfa3b3c585a0) +--- + include/midi_alsa_seq.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/midi_alsa_seq.h b/include/midi_alsa_seq.h +index 0096b91..35f992e 100644 +--- a/include/midi_alsa_seq.h ++++ b/include/midi_alsa_seq.h +@@ -75,10 +75,10 @@ public: + // list seq-ports from ALSA + virtual QStringList readablePorts( void ) const + { +- return( m_readablePorts ); ++ return m_readablePorts; + } + +- virtual QStringList writeblePorts( void ) const ++ virtual QStringList writablePorts( void ) const + { + return m_writablePorts; + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0029-make-sure-all-buttons-in-trackOperationsWidget-have.patch +++ lmms-0.4.2/debian/patches/0029-make-sure-all-buttons-in-trackOperationsWidget-have.patch @@ -0,0 +1,47 @@ +From 168b65dfaeb8643789daa0539d4dbe83b33ee1fd Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 19 Feb 2009 15:02:41 +0000 +Subject: [PATCH] make sure all buttons in trackOperationsWidget have focus-policy set to Qt::NoFocus in order to make space play song even if you clicked e.g. a mute-button (closes #2486211) (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2057 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + src/core/track.cpp | 1 + + src/gui/widgets/automatable_button.cpp | 3 ++- + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/core/track.cpp b/src/core/track.cpp +index a4c0ff5..6afd95f 100644 +--- a/src/core/track.cpp ++++ b/src/core/track.cpp +@@ -1361,6 +1361,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : + + m_trackOps = new QPushButton( this ); + m_trackOps->move( 12, 1 ); ++ m_trackOps->setFocusPolicy( Qt::NoFocus ); + m_trackOps->setMenu( to_menu ); + toolTip::add( m_trackOps, tr( "Actions for this track" ) ); + +diff --git a/src/gui/widgets/automatable_button.cpp b/src/gui/widgets/automatable_button.cpp +index 146493f..dc9b610 100644 +--- a/src/gui/widgets/automatable_button.cpp ++++ b/src/gui/widgets/automatable_button.cpp +@@ -4,7 +4,7 @@ + * automatable_button.cpp - implementation of class automatableButton and + * automatableButtonGroup + * +- * Copyright (c) 2006-2008 Tobias Doerffel ++ * Copyright (c) 2006-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -47,6 +47,7 @@ automatableButton::automatableButton( QWidget * _parent, + { + setAccessibleName( _name ); + doConnections(); ++ setFocusPolicy( Qt::NoFocus ); + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0016-various-UI-related-backports-from-trunk.patch +++ lmms-0.4.2/debian/patches/0016-various-UI-related-backports-from-trunk.patch @@ -0,0 +1,97 @@ +From 95df8100a27028ddcab298541872a3f463ef23b0 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 00:07:20 +0000 +Subject: [PATCH] various UI related backports from trunk + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2027 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 11 +++++++++++ + include/group_box.h | 2 +- + src/gui/widgets/controller_rack_view.cpp | 1 + + src/gui/widgets/effect_rack_view.cpp | 12 ++++++++---- + 4 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a006680..fc79cc2 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,16 @@ + 2009-02-12 Tobias Doerffel + ++ * include/group_box.h: ++ * src/gui/widgets/effect_rack_view.cpp: ++ backport: manage effectRackView with a QVBoxLayout ++ ++ * src/gui/widgets/controller_rack_view.cpp: ++ * src/gui/widgets/effect_rack_view.cpp: ++ backport: prevent Horizontal bars from appearing in some cases ++ ++ * cmake/modules/Win32Toolchain.cmake: ++ reflect recent changes to MinGW cross compiling environment ++ + * plugins/sf2_player/sf2_player.cpp: + update patch after loading settings (closes #2486372) + +diff --git a/include/group_box.h b/include/group_box.h +index a77e125..f506b5b 100644 +--- a/include/group_box.h ++++ b/include/group_box.h +@@ -39,7 +39,7 @@ class groupBox : public QWidget, public boolModelView + { + Q_OBJECT + public: +- groupBox( const QString & _caption, QWidget * _parent ); ++ groupBox( const QString & _caption, QWidget * _parent = NULL ); + virtual ~groupBox(); + + virtual void modelChanged( void ); +diff --git a/src/gui/widgets/controller_rack_view.cpp b/src/gui/widgets/controller_rack_view.cpp +index 558dcec..6f3b08a 100644 +--- a/src/gui/widgets/controller_rack_view.cpp ++++ b/src/gui/widgets/controller_rack_view.cpp +@@ -52,6 +52,7 @@ controllerRackView::controllerRackView( ) : + m_scrollArea = new QScrollArea( this ); + m_scrollArea->setFixedSize( 230, 184 ); + m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); ++ m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) ); + m_scrollArea->move( 6, 22 ); + +diff --git a/src/gui/widgets/effect_rack_view.cpp b/src/gui/widgets/effect_rack_view.cpp +index 2c20f71..0fb2ae5 100644 +--- a/src/gui/widgets/effect_rack_view.cpp ++++ b/src/gui/widgets/effect_rack_view.cpp +@@ -45,13 +45,19 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) : + setAttribute( Qt::WA_OpaquePaintEvent, true ); + setFixedSize( 250, 250 ); + +- m_effectsGroupBox = new groupBox( tr( "EFFECTS CHAIN" ), this ); +- m_effectsGroupBox->setGeometry( 4, 5, 242, 240 ); ++ m_mainLayout = new QVBoxLayout( this ); ++ m_mainLayout->setSpacing( 0 ); ++ m_mainLayout->setMargin( 5 ); ++ ++ m_effectsGroupBox = new groupBox( tr( "EFFECTS CHAIN" ) ); ++ m_mainLayout->addWidget( m_effectsGroupBox ); + + m_scrollArea = new QScrollArea( m_effectsGroupBox ); + m_scrollArea->setFixedSize( 230, 184 ); + m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); ++ m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) ); ++ m_scrollArea->setWidget( new QWidget ); + m_scrollArea->move( 6, 22 ); + + QPushButton * addButton = new QPushButton( m_effectsGroupBox ); +@@ -59,8 +65,6 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) : + addButton->move( 8, 210 ); + connect( addButton, SIGNAL( clicked() ), this, SLOT( addEffect() ) ); + +- QWidget * w = new QWidget; +- m_scrollArea->setWidget( w ); + + m_lastY = 0; + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0055-MidiPort-subscribe-writable-rather-than-readable-po.patch +++ lmms-0.4.2/debian/patches/0055-MidiPort-subscribe-writable-rather-than-readable-po.patch @@ -0,0 +1,28 @@ +From 49ffdcd5bccce06fa684ea3b9b590bf4a753c467 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sat, 14 Mar 2009 19:09:46 +0100 +Subject: [PATCH] MidiPort: subscribe writable rather than readable port when settings + +When loading MidiPort settings, erroneously readable port was subscribed rather +than writable port. This commit fixes the issue. +(cherry picked from commit d981b3248067bbcd7d5c6e1c940080e00c1c22c0) +--- + src/core/midi/midi_port.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/core/midi/midi_port.cpp b/src/core/midi/midi_port.cpp +index b882108..1b5874f 100644 +--- a/src/core/midi/midi_port.cpp ++++ b/src/core/midi/midi_port.cpp +@@ -266,7 +266,7 @@ void midiPort::loadSettings( const QDomElement & _this ) + { + if( it.value() != ( wp.indexOf( it.key() ) != -1 ) ) + { +- subscribeReadablePort( it.key() ); ++ subscribeWritablePort( it.key() ); + } + } + emit writablePortsChanged(); +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0006-simplified-formulas-for-calculating-envelope-array-r.patch +++ lmms-0.4.2/debian/patches/0006-simplified-formulas-for-calculating-envelope-array-r.patch @@ -0,0 +1,82 @@ +From 1ffe1c073391ca80ae2bc0f83cd8103232c5903a Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 5 Feb 2009 13:17:21 +0000 +Subject: [PATCH] simplified formulas for calculating envelope array resulting in about 3x performance with traditional FPU code; loops now can be vectorized by GCC 4.4 + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2003 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + src/core/envelope_and_lfo_parameters.cpp | 22 ++++++++++++++-------- + 1 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/src/core/envelope_and_lfo_parameters.cpp b/src/core/envelope_and_lfo_parameters.cpp +index f18c257..b487cef 100644 +--- a/src/core/envelope_and_lfo_parameters.cpp ++++ b/src/core/envelope_and_lfo_parameters.cpp +@@ -245,10 +245,11 @@ inline void envelopeAndLFOParameters::fillLFOLevel( float * _buf, + } + + fpp_t offset = 0; ++ const float lafI = 1.0f / m_lfoAttackFrames; + for( ; offset < _frames && _frame < m_lfoAttackFrames; ++offset, + ++_frame ) + { +- *_buf++ = m_lfoShapeData[offset] * _frame / m_lfoAttackFrames; ++ *_buf++ = m_lfoShapeData[offset] * _frame * lafI; + } + for( ; offset < _frames; ++offset ) + { +@@ -411,39 +412,44 @@ void envelopeAndLFOParameters::updateSampleVars( void ) + m_pahdEnv = new sample_t[m_pahdFrames]; + m_rEnv = new sample_t[m_rFrames]; + ++ const float aa = m_amountAdd; + for( f_cnt_t i = 0; i < predelay_frames; ++i ) + { +- m_pahdEnv[i] = m_amountAdd; ++ m_pahdEnv[i] = aa; + } + + f_cnt_t add = predelay_frames; + ++ const float afI = ( 1.0f / attack_frames ) * m_amount; + for( f_cnt_t i = 0; i < attack_frames; ++i ) + { +- m_pahdEnv[add + i] = ( (float)i / attack_frames ) * +- m_amount + m_amountAdd; ++ m_pahdEnv[add+i] = i * afI + aa; + } + + add += attack_frames; ++ const float amsum = m_amount + m_amountAdd; + for( f_cnt_t i = 0; i < hold_frames; ++i ) + { +- m_pahdEnv[add + i] = m_amount + m_amountAdd; ++ m_pahdEnv[add + i] = amsum; + } + + add += hold_frames; ++ const float dfI = (1.0 / decay_frames)*(m_sustainLevel-1)*m_amount; + for( f_cnt_t i = 0; i < decay_frames; ++i ) + { ++/* + m_pahdEnv[add + i] = ( m_sustainLevel + ( 1.0f - + (float)i / decay_frames ) * + ( 1.0f - m_sustainLevel ) ) * + m_amount + m_amountAdd; ++*/ ++ m_pahdEnv[add + i] = amsum + i*dfI; + } + ++ const float rfI = ( 1.0f / m_rFrames ) * m_amount; + for( f_cnt_t i = 0; i < m_rFrames; ++i ) + { +- m_rEnv[i] = ( (float)( m_rFrames - i ) / m_rFrames +- // * m_sustainLevel +- ) * m_amount; ++ m_rEnv[i] = (float)( m_rFrames - i ) * rfI; + } + + // save this calculation in real-time-part +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0010-integrated-pitanga-s-patch-to-fix-unquantized-BB-dra.patch +++ lmms-0.4.2/debian/patches/0010-integrated-pitanga-s-patch-to-fix-unquantized-BB-dra.patch @@ -0,0 +1,64 @@ +From 48990656b92855e764b6ba5bee91d5949c59e684 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 5 Feb 2009 13:23:32 +0000 +Subject: [PATCH] integrated pitanga's patch to fix unquantized BB dragging in song editor. Changed ctrl modifier to alt to be consistent (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2008 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 6 ++++++ + src/core/track.cpp | 15 ++++++++++----- + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 628d286..089b0ca 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -49,6 +49,12 @@ + * CMakeLists.txt: + fixed plugins/ directory when updating localization file + ++ * src/core/track.cpp: ++ integrated pitanga's patch to fix unquantized BB dragging in ++ song editor. Changed ctrl modifier to alt to be consistent. ++ ++2009-02-01 Andrew Kelley ++ + * plugins/flp_import/flp_import.cpp: + in FL_EffectChannel initialize isMuted member - fixes muted FX channels + when importing older FLP files +diff --git a/src/core/track.cpp b/src/core/track.cpp +index d4e83ba..913e8e8 100644 +--- a/src/core/track.cpp ++++ b/src/core/track.cpp +@@ -684,7 +684,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) + QVector so = + m_trackView->getTrackContainerView()->selectedObjects(); + QVector tcos; +- midiTime smallest_pos; ++ midiTime smallest_pos, t; + // find out smallest position of all selected objects for not + // moving an object before zero + for( QVector::iterator it = so.begin(); +@@ -706,10 +706,15 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) + for( QVector::iterator it = tcos.begin(); + it != tcos.end(); ++it ) + { +- ( *it )->movePosition( ( *it )->startPosition() + +- static_cast( dx * +- midiTime::ticksPerTact() / ppt ) - +- smallest_pos ); ++ t = ( *it )->startPosition() + ++ static_cast( dx *midiTime::ticksPerTact() / ++ ppt )-smallest_pos; ++ if( ! ( _me->modifiers() & Qt::AltModifier ) ++ && _me->button() == Qt::NoButton ) ++ { ++ t = t.toNearestTact(); ++ } ++ ( *it )->movePosition( t ); + } + } + else if( m_action == Resize ) +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/series +++ lmms-0.4.2/debian/patches/series @@ -0,0 +1,38 @@ +0001-in-FL_EffectChannel-initialize-isMuted-member-fixe.patch +0003-stable-backport-of-various-fixes-from-trunk.patch +0004-reworked-mixer-threads-synchronization-realization.patch +0005-fixed-bug-you-can-use-shift-left-to-move-notes-past.patch +0006-simplified-formulas-for-calculating-envelope-array-r.patch +0009-better-workaround-for-optimizer-bug-in-GCC-4.3-s.patch +0010-integrated-pitanga-s-patch-to-fix-unquantized-BB-dra.patch +0012-do-not-load-samples-bigger-than-100-MB-closes-2458.patch +0013-ensure-cursor-is-never-NULL-when-painting-it-in-pai.patch +0014-update-patch-after-loading-settings-closes-2486372.patch +0016-various-UI-related-backports-from-trunk.patch +0017-fix-distorted-widgets-everywhere-with-qt45.patch +0018-disable-output-monitor-per-default-and-show-click-hi.patch +0020-integrated-latest-libsamplerate-0.1.6-which-is-bot.patch +0021-fix-misloaded-samples.patch +0022-fix-lockup-when-freezing-patterns.patch +0023-reverted-rev-2037-as-we-have-custom-changes-in-this.patch +0029-make-sure-all-buttons-in-trackOperationsWidget-have.patch +0034-added-copy-constructor-implementation-for-AtomicInt.patch +0040-PeakController-always-check-for-m_peakEffect-NUL.patch +0042-NotePlayHandle-call-instrumentTrack-deleteNotePlug.patch +0044-MidiImport-per-default-use-bank-0-instead-of-128.patch +0045-PatternView-if-volume-of-a-step-is-95-it-was-not-po.patch +0046-TrackContainerView-when-dragging-a-preset-file-into.patch +0047-PeakControllerEffect-corrected-calculation-for-RMS.patch +0048-MidiPort-properly-emit-portChanged-signals-when-loa.patch +0049-MIDI-subsystem-fixed-misspelled-writeable-into-w.patch +0050-AutomationPattern-save-and-restore-length-of-Automa.patch +0052-FX-Fader-added-accessibleName-property-for-FX-fader.patch +0054-MidiAlsaSeq-fixed-typo-which-made-output-ports-not.patch +0055-MidiPort-subscribe-writable-rather-than-readable-po.patch +0058-AutomationPatternView-fixed-painting-of-automation.patch +0060-MidiImport-fixed-mistransposed-notes.patch +0061-LadspaEffect-fixed-controller-connections-on-sample.patch +0062-Oscillator-fixed-samplerate-dependence-of-FM-PM.patch +0064-RemoteVstPlugin-use-SplittedThreading-model-for-MDA.patch +0065-Oscillator-reverted-recent-fix-for-PM.patch +0066-VstEffect-set-displayName-property-at-initializatio.patch --- lmms-0.4.2.orig/debian/patches/0034-added-copy-constructor-implementation-for-AtomicInt.patch +++ lmms-0.4.2/debian/patches/0034-added-copy-constructor-implementation-for-AtomicInt.patch @@ -0,0 +1,56 @@ +From 2ff42ac80bfa95f4ef59fb4fb7bce793293c7cd0 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Mon, 23 Feb 2009 22:32:31 +0000 +Subject: [PATCH] added copy constructor implementation for AtomicInt class - fixes build failure with Qt < 4.4.0, fixed typo + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2074 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 5 +++++ + include/atomic_int.h | 8 +++++++- + 2 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 2ecc55d..49fb33b 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -4,6 +4,11 @@ + * CMakeLists.txt: + made 0.4.3 release + ++ * include/atomic_int.h: ++ - fixed typo ++ - added copy constructor implementation for AtomicInt class - fixes ++ build failure with Qt < 4.4.0 ++ + * CMakeLists.txt: + fixed typos + +diff --git a/include/atomic_int.h b/include/atomic_int.h +index f6a835b..dd8bf78 100755 +--- a/include/atomic_int.h ++++ b/include/atomic_int.h +@@ -27,7 +27,7 @@ + + #include + +-#if QT_VERSION > 0x040400 ++#if QT_VERSION >= 0x040400 + + typedef QAtomicInt AtomicInt; + +@@ -42,6 +42,12 @@ public: + { + } + ++ inline AtomicInt( const AtomicInt & _copy ) : ++ m_value( _copy.m_value ), ++ m_lock() ++ { ++ } ++ + inline int fetchAndStoreOrdered( int _newVal ) + { + m_lock.lock(); +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0020-integrated-latest-libsamplerate-0.1.6-which-is-bot.patch +++ lmms-0.4.2/debian/patches/0020-integrated-latest-libsamplerate-0.1.6-which-is-bot.patch @@ -0,0 +1,1455 @@ +From ab180ad2540a1e68af718b4613421e1bfa0579dd Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 16:31:01 +0000 +Subject: [PATCH] integrated latest libsamplerate (0.1.6) which is both faster and more reliable (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2038 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + CMakeLists.txt | 2 +- + ChangeLog | 8 + + src/3rdparty/samplerate/samplerate.c | 20 +- + src/3rdparty/samplerate/samplerate.h | 10 +- + src/3rdparty/samplerate/src_linear.c | 104 ++-- + src/3rdparty/samplerate/src_sinc.c | 866 +++++++++++++++++++++++++++++++--- + src/3rdparty/samplerate/src_zoh.c | 95 ++-- + 7 files changed, 914 insertions(+), 191 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97eeeb4..d531dfa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -317,7 +317,7 @@ ENDIF(LMMS_BUILD_WIN32) + + # check for libsamplerate + IF(WANT_SYSTEM_SR) +- PKG_CHECK_MODULES(SAMPLERATE samplerate>=0.1.3) ++ PKG_CHECK_MODULES(SAMPLERATE samplerate>=0.1.6) + IF(SAMPLERATE_FOUND) + SET(LMMS_HAVE_SAMPLERATE TRUE) + ENDIF(SAMPLERATE_FOUND) +diff --git a/ChangeLog b/ChangeLog +index 55c2cad..c998ae9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,13 @@ + 2009-02-13 Tobias Doerffel + ++ * src/3rdparty/samplerate/src_linear.c: ++ * src/3rdparty/samplerate/samplerate.h: ++ * src/3rdparty/samplerate/src_sinc.c: ++ * src/3rdparty/samplerate/src_zoh.c: ++ * src/3rdparty/samplerate/samplerate.c: ++ * CMakeLists.txt: ++ integrated latest libsamplerate which is both faster and more reliable ++ + * src/gui/widgets/visualization_widget.cpp: + disable output monitor per default and show click-hint + +diff --git a/src/3rdparty/samplerate/samplerate.c b/src/3rdparty/samplerate/samplerate.c +index 3a264ac..504372f 100644 +--- a/src/3rdparty/samplerate/samplerate.c ++++ b/src/3rdparty/samplerate/samplerate.c +@@ -87,7 +87,8 @@ src_callback_new (src_callback_t func, int converter_type, int channels, int *er + if (error != NULL) + *error = 0 ; + +- src_state = src_new (converter_type, channels, error) ; ++ if ((src_state = src_new (converter_type, channels, error)) == NULL) ++ return NULL ; + + src_reset (src_state) ; + +@@ -132,16 +133,13 @@ src_process (SRC_STATE *state, SRC_DATA *data) + if (data == NULL) + return SRC_ERR_BAD_DATA ; + +- /* Check src_ratio is in range. */ +- if (is_bad_src_ratio (data->src_ratio)) +- return SRC_ERR_BAD_SRC_RATIO ; +- + /* And that data_in and data_out are valid. */ + if (data->data_in == NULL || data->data_out == NULL) + return SRC_ERR_BAD_DATA_PTR ; + +- if (data->data_in == NULL) +- data->input_frames = 0 ; ++ /* Check src_ratio is in range. */ ++ if (is_bad_src_ratio (data->src_ratio)) ++ return SRC_ERR_BAD_SRC_RATIO ; + + if (data->input_frames < 0) + data->input_frames = 0 ; +@@ -224,9 +222,13 @@ src_callback_read (SRC_STATE *state, double src_ratio, long frames, float *data) + + output_frames_gen = 0 ; + while (output_frames_gen < frames) +- { ++ { /* Use a dummy array for the case where the callback function ++ ** returns without setting the ptr. ++ */ ++ float dummy [1] ; ++ + if (src_data.input_frames == 0) +- { float *ptr ; ++ { float *ptr = dummy ; + + src_data.input_frames = psrc->callback_func (psrc->user_callback_data, &ptr) ; + src_data.data_in = ptr ; +diff --git a/src/3rdparty/samplerate/samplerate.h b/src/3rdparty/samplerate/samplerate.h +index 160b8bd..9651e63 100644 +--- a/src/3rdparty/samplerate/samplerate.h ++++ b/src/3rdparty/samplerate/samplerate.h +@@ -30,8 +30,6 @@ + #ifndef SAMPLERATE_H + #define SAMPLERATE_H + +-#include "export.h" +- + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ +@@ -75,7 +73,7 @@ typedef long (*src_callback_t) (void *cb_data, float **data) ; + ** Error returned in *error. + */ + +-SRC_STATE* EXPORT src_new (int converter_type, int channels, int *error) ; ++SRC_STATE* src_new (int converter_type, int channels, int *error) ; + + /* + ** Initilisation for callback based API : return an anonymous pointer to the +@@ -93,14 +91,14 @@ SRC_STATE* src_callback_new (src_callback_t func, int converter_type, int channe + ** Always returns NULL. + */ + +-SRC_STATE* EXPORT src_delete (SRC_STATE *state) ; ++SRC_STATE* src_delete (SRC_STATE *state) ; + + /* + ** Standard processing function. + ** Returns non zero on error. + */ + +-int EXPORT src_process (SRC_STATE *state, SRC_DATA *data) ; ++int src_process (SRC_STATE *state, SRC_DATA *data) ; + + /* + ** Callback based processing function. Read up to frames worth of data from +@@ -163,7 +161,7 @@ int src_error (SRC_STATE *state) ; + /* + ** Convert the error number into a string. + */ +-const char* EXPORT src_strerror (int error) ; ++const char* src_strerror (int error) ; + + /* + ** The following enums can be used to set the interpolator type +diff --git a/src/3rdparty/samplerate/src_linear.c b/src/3rdparty/samplerate/src_linear.c +index 960d204..f97ba45 100644 +--- a/src/3rdparty/samplerate/src_linear.c ++++ b/src/3rdparty/samplerate/src_linear.c +@@ -54,42 +54,42 @@ typedef struct + + static int + linear_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) +-{ LINEAR_DATA *linear ; ++{ LINEAR_DATA *priv ; + double src_ratio, input_index, rem ; + int ch ; + + if (psrc->private_data == NULL) + return SRC_ERR_NO_PRIVATE ; + +- linear = (LINEAR_DATA*) psrc->private_data ; ++ priv = (LINEAR_DATA*) psrc->private_data ; + +- if (linear->reset) ++ if (priv->reset) + { /* If we have just been reset, set the last_value data. */ +- for (ch = 0 ; ch < linear->channels ; ch++) +- linear->last_value [ch] = data->data_in [ch] ; +- linear->reset = 0 ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ priv->last_value [ch] = data->data_in [ch] ; ++ priv->reset = 0 ; + } ; + +- linear->in_count = data->input_frames * linear->channels ; +- linear->out_count = data->output_frames * linear->channels ; +- linear->in_used = linear->out_gen = 0 ; ++ priv->in_count = data->input_frames * priv->channels ; ++ priv->out_count = data->output_frames * priv->channels ; ++ priv->in_used = priv->out_gen = 0 ; + + src_ratio = psrc->last_ratio ; + input_index = psrc->last_position ; + + /* Calculate samples before first sample in input array. */ +- while (input_index < 1.0 && linear->out_gen < linear->out_count) ++ while (input_index < 1.0 && priv->out_gen < priv->out_count) + { +- if (linear->in_used + linear->channels * input_index > linear->in_count) ++ if (priv->in_used + priv->channels * (1.0 + input_index) >= priv->in_count) + break ; + +- if (linear->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) +- src_ratio = psrc->last_ratio + linear->out_gen * (data->src_ratio - psrc->last_ratio) / linear->out_count ; ++ if (priv->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) ++ src_ratio = psrc->last_ratio + priv->out_gen * (data->src_ratio - psrc->last_ratio) / priv->out_count ; + +- for (ch = 0 ; ch < linear->channels ; ch++) +- { data->data_out [linear->out_gen] = (float) (linear->last_value [ch] + input_index * +- (data->data_in [ch] - linear->last_value [ch])) ; +- linear->out_gen ++ ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ { data->data_out [priv->out_gen] = (float) (priv->last_value [ch] + input_index * ++ (data->data_in [ch] - priv->last_value [ch])) ; ++ priv->out_gen ++ ; + } ; + + /* Figure out the next index. */ +@@ -97,50 +97,50 @@ linear_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) + } ; + + rem = fmod_one (input_index) ; +- linear->in_used += linear->channels * lrint (input_index - rem) ; ++ priv->in_used += priv->channels * lrint (input_index - rem) ; + input_index = rem ; + + /* Main processing loop. */ +- while (linear->out_gen < linear->out_count && linear->in_used + linear->channels * input_index <= linear->in_count) ++ while (priv->out_gen < priv->out_count && priv->in_used + priv->channels * input_index < priv->in_count) + { +- if (linear->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) +- src_ratio = psrc->last_ratio + linear->out_gen * (data->src_ratio - psrc->last_ratio) / linear->out_count ; ++ if (priv->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) ++ src_ratio = psrc->last_ratio + priv->out_gen * (data->src_ratio - psrc->last_ratio) / priv->out_count ; + +- if (SRC_DEBUG && linear->in_used < linear->channels && input_index < 1.0) +- { printf ("Whoops!!!! in_used : %ld channels : %d input_index : %f\n", linear->in_used, linear->channels, input_index) ; ++ if (SRC_DEBUG && priv->in_used < priv->channels && input_index < 1.0) ++ { printf ("Whoops!!!! in_used : %ld channels : %d input_index : %f\n", priv->in_used, priv->channels, input_index) ; + exit (1) ; + } ; + +- for (ch = 0 ; ch < linear->channels ; ch++) +- { data->data_out [linear->out_gen] = (float) (data->data_in [linear->in_used - linear->channels + ch] + input_index * +- (data->data_in [linear->in_used + ch] - data->data_in [linear->in_used - linear->channels + ch])) ; +- linear->out_gen ++ ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ { data->data_out [priv->out_gen] = (float) (data->data_in [priv->in_used - priv->channels + ch] + input_index * ++ (data->data_in [priv->in_used + ch] - data->data_in [priv->in_used - priv->channels + ch])) ; ++ priv->out_gen ++ ; + } ; + + /* Figure out the next index. */ + input_index += 1.0 / src_ratio ; + rem = fmod_one (input_index) ; + +- linear->in_used += linear->channels * lrint (input_index - rem) ; ++ priv->in_used += priv->channels * lrint (input_index - rem) ; + input_index = rem ; + } ; + +- if (linear->in_used > linear->in_count) +- { input_index += (linear->in_used - linear->in_count) / linear->channels ; +- linear->in_used = linear->in_count ; ++ if (priv->in_used > priv->in_count) ++ { input_index += (priv->in_used - priv->in_count) / priv->channels ; ++ priv->in_used = priv->in_count ; + } ; + + psrc->last_position = input_index ; + +- if (linear->in_used > 0) +- for (ch = 0 ; ch < linear->channels ; ch++) +- linear->last_value [ch] = data->data_in [linear->in_used - linear->channels + ch] ; ++ if (priv->in_used > 0) ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ priv->last_value [ch] = data->data_in [priv->in_used - priv->channels + ch] ; + + /* Save current ratio rather then target ratio. */ + psrc->last_ratio = src_ratio ; + +- data->input_frames_used = linear->in_used / linear->channels ; +- data->output_frames_gen = linear->out_gen / linear->channels ; ++ data->input_frames_used = priv->in_used / priv->channels ; ++ data->output_frames_gen = priv->out_gen / priv->channels ; + + return SRC_ERR_NO_ERROR ; + } /* linear_vari_process */ +@@ -168,28 +168,25 @@ linear_get_description (int src_enum) + + int + linear_set_converter (SRC_PRIVATE *psrc, int src_enum) +-{ LINEAR_DATA *linear = NULL ; ++{ LINEAR_DATA *priv = NULL ; + + if (src_enum != SRC_LINEAR) + return SRC_ERR_BAD_CONVERTER ; + + if (psrc->private_data != NULL) +- { linear = (LINEAR_DATA*) psrc->private_data ; +- if (linear->linear_magic_marker != LINEAR_MAGIC_MARKER) +- { free (psrc->private_data) ; +- psrc->private_data = NULL ; +- } ; ++ { free (psrc->private_data) ; ++ psrc->private_data = NULL ; + } ; + + if (psrc->private_data == NULL) +- { linear = calloc (1, sizeof (*linear) + psrc->channels * sizeof (float)) ; +- if (linear == NULL) ++ { priv = calloc (1, sizeof (*priv) + psrc->channels * sizeof (float)) ; ++ if (priv == NULL) + return SRC_ERR_MALLOC_FAILED ; +- psrc->private_data = linear ; ++ psrc->private_data = priv ; + } ; + +- linear->linear_magic_marker = LINEAR_MAGIC_MARKER ; +- linear->channels = psrc->channels ; ++ priv->linear_magic_marker = LINEAR_MAGIC_MARKER ; ++ priv->channels = psrc->channels ; + + psrc->const_process = linear_vari_process ; + psrc->vari_process = linear_vari_process ; +@@ -205,15 +202,16 @@ linear_set_converter (SRC_PRIVATE *psrc, int src_enum) + + static void + linear_reset (SRC_PRIVATE *psrc) +-{ LINEAR_DATA *linear = NULL ; ++{ LINEAR_DATA *priv = NULL ; + +- linear = (LINEAR_DATA*) psrc->private_data ; +- if (linear == NULL) ++ priv = (LINEAR_DATA*) psrc->private_data ; ++ if (priv == NULL) + return ; + +- linear->channels = psrc->channels ; +- linear->reset = 1 ; ++ priv->channels = psrc->channels ; ++ priv->reset = 1 ; ++ memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; + +- memset (linear->last_value, 0, sizeof (linear->last_value [0]) * linear->channels) ; ++ return ; + } /* linear_reset */ + +diff --git a/src/3rdparty/samplerate/src_sinc.c b/src/3rdparty/samplerate/src_sinc.c +index fadacac..899249e 100644 +--- a/src/3rdparty/samplerate/src_sinc.c ++++ b/src/3rdparty/samplerate/src_sinc.c +@@ -65,12 +65,16 @@ typedef struct + coeff_t const *coeffs ; + + int b_current, b_end, b_real_end, b_len ; +- float buffer [1] ; +-} SINC_FILTER ; + +-static int sinc_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; ++ /* C99 struct flexible array. */ ++ float buffer [] ; ++} SINC_FILTER ; + +-static double calc_output (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, int ch) ; ++static int sinc_multichan_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; ++static int sinc_hex_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; ++static int sinc_quad_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; ++static int sinc_stereo_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; ++static int sinc_mono_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ; + + static void prepare_data (SINC_FILTER *filter, SRC_DATA *data, int half_filter_chan_len) ; + +@@ -78,9 +82,7 @@ static void sinc_reset (SRC_PRIVATE *psrc) ; + + static inline increment_t + double_to_fp (double x) +-{ if (sizeof (increment_t) == 8) +- return (llrint ((x) * FP_ONE)) ; +- return (lrint ((x) * FP_ONE)) ; ++{ return (lrint ((x) * FP_ONE)) ; + } /* double_to_fp */ + + static inline increment_t +@@ -157,11 +159,8 @@ sinc_set_converter (SRC_PRIVATE *psrc, int src_enum) + return SRC_ERR_SHIFT_BITS ; + + if (psrc->private_data != NULL) +- { filter = (SINC_FILTER*) psrc->private_data ; +- if (filter->sinc_magic_marker != SINC_MAGIC_MARKER) +- { free (psrc->private_data) ; +- psrc->private_data = NULL ; +- } ; ++ { free (psrc->private_data) ; ++ psrc->private_data = NULL ; + } ; + + memset (&temp_filter, 0, sizeof (temp_filter)) ; +@@ -169,8 +168,29 @@ sinc_set_converter (SRC_PRIVATE *psrc, int src_enum) + temp_filter.sinc_magic_marker = SINC_MAGIC_MARKER ; + temp_filter.channels = psrc->channels ; + +- psrc->const_process = sinc_vari_process ; +- psrc->vari_process = sinc_vari_process ; ++ if (psrc->channels == 1) ++ { psrc->const_process = sinc_mono_vari_process ; ++ psrc->vari_process = sinc_mono_vari_process ; ++ } ++ else ++ if (psrc->channels == 2) ++ { psrc->const_process = sinc_stereo_vari_process ; ++ psrc->vari_process = sinc_stereo_vari_process ; ++ } ++ else ++ if (psrc->channels == 4) ++ { psrc->const_process = sinc_quad_vari_process ; ++ psrc->vari_process = sinc_quad_vari_process ; ++ } ++ else ++ if (psrc->channels == 6) ++ { psrc->const_process = sinc_hex_vari_process ; ++ psrc->vari_process = sinc_hex_vari_process ; ++ } ++ else ++ { psrc->const_process = sinc_multichan_vari_process ; ++ psrc->vari_process = sinc_multichan_vari_process ; ++ } ; + psrc->reset = sinc_reset ; + + switch (src_enum) +@@ -248,12 +268,64 @@ sinc_reset (SRC_PRIVATE *psrc) + ** Beware all ye who dare pass this point. There be dragons here. + */ + ++static inline double ++calc_output_single (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index) ++{ double fraction, left, right, icoeff ; ++ increment_t filter_index, max_filter_index ; ++ int data_index, coeff_count, indx ; ++ ++ /* Convert input parameters into fixed point. */ ++ max_filter_index = int_to_fp (filter->coeff_half_len) ; ++ ++ /* First apply the left half of the filter. */ ++ filter_index = start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current - coeff_count ; ++ ++ left = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ left += icoeff * filter->buffer [data_index] ; ++ ++ filter_index -= increment ; ++ data_index = data_index + 1 ; ++ } ++ while (filter_index >= MAKE_INCREMENT_T (0)) ; ++ ++ /* Now apply the right half of the filter. */ ++ filter_index = increment - start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current + 1 + coeff_count ; ++ ++ right = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ right += icoeff * filter->buffer [data_index] ; ++ ++ filter_index -= increment ; ++ data_index = data_index - 1 ; ++ } ++ while (filter_index > MAKE_INCREMENT_T (0)) ; ++ ++ return (left + right) ; ++} /* calc_output_single */ ++ + static int +-sinc_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ++sinc_mono_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) + { SINC_FILTER *filter ; + double input_index, src_ratio, count, float_increment, terminate, rem ; + increment_t increment, start_filter_index ; +- int half_filter_chan_len, samples_in_hand, ch ; ++ int half_filter_chan_len, samples_in_hand ; + + if (psrc->private_data == NULL) + return SRC_ERR_NO_PRIVATE ; +@@ -318,12 +390,157 @@ sinc_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) + + start_filter_index = double_to_fp (input_index * float_increment) ; + +- for (ch = 0 ; ch < filter->channels ; ch++) +- { data->data_out [filter->out_gen] = (float) ((float_increment / filter->index_inc) * +- calc_output (filter, increment, start_filter_index, ch)) ; +- filter->out_gen ++ ; ++ data->data_out [filter->out_gen] = (float) ((float_increment / filter->index_inc) * ++ calc_output_single (filter, increment, start_filter_index)) ; ++ filter->out_gen ++ ; ++ ++ /* Figure out the next index. */ ++ input_index += 1.0 / src_ratio ; ++ rem = fmod_one (input_index) ; ++ ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ } ; ++ ++ psrc->last_position = input_index ; ++ ++ /* Save current ratio rather then target ratio. */ ++ psrc->last_ratio = src_ratio ; ++ ++ data->input_frames_used = filter->in_used / filter->channels ; ++ data->output_frames_gen = filter->out_gen / filter->channels ; ++ ++ return SRC_ERR_NO_ERROR ; ++} /* sinc_mono_vari_process */ ++ ++static inline void ++calc_output_stereo (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, double scale, float * output) ++{ double fraction, left [2], right [2], icoeff ; ++ increment_t filter_index, max_filter_index ; ++ int data_index, coeff_count, indx ; ++ ++ /* Convert input parameters into fixed point. */ ++ max_filter_index = int_to_fp (filter->coeff_half_len) ; ++ ++ /* First apply the left half of the filter. */ ++ filter_index = start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current - filter->channels * coeff_count ; ++ ++ left [0] = left [1] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ left [0] += icoeff * filter->buffer [data_index] ; ++ left [1] += icoeff * filter->buffer [data_index + 1] ; ++ ++ filter_index -= increment ; ++ data_index = data_index + 2 ; ++ } ++ while (filter_index >= MAKE_INCREMENT_T (0)) ; ++ ++ /* Now apply the right half of the filter. */ ++ filter_index = increment - start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current + filter->channels * (1 + coeff_count) ; ++ ++ right [0] = right [1] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ right [0] += icoeff * filter->buffer [data_index] ; ++ right [1] += icoeff * filter->buffer [data_index + 1] ; ++ ++ filter_index -= increment ; ++ data_index = data_index - 2 ; ++ } ++ while (filter_index > MAKE_INCREMENT_T (0)) ; ++ ++ output [0] = scale * (left [0] + right [0]) ; ++ output [1] = scale * (left [1] + right [1]) ; ++} /* calc_output_stereo */ ++ ++static int ++sinc_stereo_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ++{ SINC_FILTER *filter ; ++ double input_index, src_ratio, count, float_increment, terminate, rem ; ++ increment_t increment, start_filter_index ; ++ int half_filter_chan_len, samples_in_hand ; ++ ++ if (psrc->private_data == NULL) ++ return SRC_ERR_NO_PRIVATE ; ++ ++ filter = (SINC_FILTER*) psrc->private_data ; ++ ++ /* If there is not a problem, this will be optimised out. */ ++ if (sizeof (filter->buffer [0]) != sizeof (data->data_in [0])) ++ return SRC_ERR_SIZE_INCOMPATIBILITY ; ++ ++ filter->in_count = data->input_frames * filter->channels ; ++ filter->out_count = data->output_frames * filter->channels ; ++ filter->in_used = filter->out_gen = 0 ; ++ ++ src_ratio = psrc->last_ratio ; ++ ++ /* Check the sample rate ratio wrt the buffer len. */ ++ count = (filter->coeff_half_len + 2.0) / filter->index_inc ; ++ if (MIN (psrc->last_ratio, data->src_ratio) < 1.0) ++ count /= MIN (psrc->last_ratio, data->src_ratio) ; ++ ++ /* Maximum coefficientson either side of center point. */ ++ half_filter_chan_len = filter->channels * (lrint (count) + 1) ; ++ ++ input_index = psrc->last_position ; ++ float_increment = filter->index_inc ; ++ ++ rem = fmod_one (input_index) ; ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ ++ terminate = 1.0 / src_ratio + 1e-20 ; ++ ++ /* Main processing loop. */ ++ while (filter->out_gen < filter->out_count) ++ { ++ /* Need to reload buffer? */ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ ++ if (samples_in_hand <= half_filter_chan_len) ++ { prepare_data (filter, data, half_filter_chan_len) ; ++ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ if (samples_in_hand <= half_filter_chan_len) ++ break ; ++ } ; ++ ++ /* This is the termination condition. */ ++ if (filter->b_real_end >= 0) ++ { if (filter->b_current + input_index + terminate >= filter->b_real_end) ++ break ; + } ; + ++ if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10) ++ src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ; ++ ++ float_increment = filter->index_inc * 1.0 ; ++ if (src_ratio < 1.0) ++ float_increment = filter->index_inc * src_ratio ; ++ ++ increment = double_to_fp (float_increment) ; ++ ++ start_filter_index = double_to_fp (input_index * float_increment) ; ++ ++ calc_output_stereo (filter, increment, start_filter_index, float_increment / filter->index_inc, data->data_out + filter->out_gen) ; ++ filter->out_gen += 2 ; ++ + /* Figure out the next index. */ + input_index += 1.0 / src_ratio ; + rem = fmod_one (input_index) ; +@@ -341,7 +558,562 @@ sinc_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) + data->output_frames_gen = filter->out_gen / filter->channels ; + + return SRC_ERR_NO_ERROR ; +-} /* sinc_vari_process */ ++} /* sinc_stereo_vari_process */ ++ ++static inline void ++calc_output_quad (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, double scale, float * output) ++{ double fraction, left [4], right [4], icoeff ; ++ increment_t filter_index, max_filter_index ; ++ int data_index, coeff_count, indx ; ++ ++ /* Convert input parameters into fixed point. */ ++ max_filter_index = int_to_fp (filter->coeff_half_len) ; ++ ++ /* First apply the left half of the filter. */ ++ filter_index = start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current - filter->channels * coeff_count ; ++ ++ left [0] = left [1] = left [2] = left [3] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ left [0] += icoeff * filter->buffer [data_index] ; ++ left [1] += icoeff * filter->buffer [data_index + 1] ; ++ left [2] += icoeff * filter->buffer [data_index + 2] ; ++ left [3] += icoeff * filter->buffer [data_index + 3] ; ++ ++ filter_index -= increment ; ++ data_index = data_index + 4 ; ++ } ++ while (filter_index >= MAKE_INCREMENT_T (0)) ; ++ ++ /* Now apply the right half of the filter. */ ++ filter_index = increment - start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current + filter->channels * (1 + coeff_count) ; ++ ++ right [0] = right [1] = right [2] = right [3] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ right [0] += icoeff * filter->buffer [data_index] ; ++ right [1] += icoeff * filter->buffer [data_index + 1] ; ++ right [2] += icoeff * filter->buffer [data_index + 2] ; ++ right [3] += icoeff * filter->buffer [data_index + 3] ; ++ ++ filter_index -= increment ; ++ data_index = data_index - 4 ; ++ } ++ while (filter_index > MAKE_INCREMENT_T (0)) ; ++ ++ output [0] = scale * (left [0] + right [0]) ; ++ output [1] = scale * (left [1] + right [1]) ; ++ output [2] = scale * (left [2] + right [2]) ; ++ output [3] = scale * (left [3] + right [3]) ; ++} /* calc_output_quad */ ++ ++static int ++sinc_quad_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ++{ SINC_FILTER *filter ; ++ double input_index, src_ratio, count, float_increment, terminate, rem ; ++ increment_t increment, start_filter_index ; ++ int half_filter_chan_len, samples_in_hand ; ++ ++ if (psrc->private_data == NULL) ++ return SRC_ERR_NO_PRIVATE ; ++ ++ filter = (SINC_FILTER*) psrc->private_data ; ++ ++ /* If there is not a problem, this will be optimised out. */ ++ if (sizeof (filter->buffer [0]) != sizeof (data->data_in [0])) ++ return SRC_ERR_SIZE_INCOMPATIBILITY ; ++ ++ filter->in_count = data->input_frames * filter->channels ; ++ filter->out_count = data->output_frames * filter->channels ; ++ filter->in_used = filter->out_gen = 0 ; ++ ++ src_ratio = psrc->last_ratio ; ++ ++ /* Check the sample rate ratio wrt the buffer len. */ ++ count = (filter->coeff_half_len + 2.0) / filter->index_inc ; ++ if (MIN (psrc->last_ratio, data->src_ratio) < 1.0) ++ count /= MIN (psrc->last_ratio, data->src_ratio) ; ++ ++ /* Maximum coefficientson either side of center point. */ ++ half_filter_chan_len = filter->channels * (lrint (count) + 1) ; ++ ++ input_index = psrc->last_position ; ++ float_increment = filter->index_inc ; ++ ++ rem = fmod_one (input_index) ; ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ ++ terminate = 1.0 / src_ratio + 1e-20 ; ++ ++ /* Main processing loop. */ ++ while (filter->out_gen < filter->out_count) ++ { ++ /* Need to reload buffer? */ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ ++ if (samples_in_hand <= half_filter_chan_len) ++ { prepare_data (filter, data, half_filter_chan_len) ; ++ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ if (samples_in_hand <= half_filter_chan_len) ++ break ; ++ } ; ++ ++ /* This is the termination condition. */ ++ if (filter->b_real_end >= 0) ++ { if (filter->b_current + input_index + terminate >= filter->b_real_end) ++ break ; ++ } ; ++ ++ if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10) ++ src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ; ++ ++ float_increment = filter->index_inc * 1.0 ; ++ if (src_ratio < 1.0) ++ float_increment = filter->index_inc * src_ratio ; ++ ++ increment = double_to_fp (float_increment) ; ++ ++ start_filter_index = double_to_fp (input_index * float_increment) ; ++ ++ calc_output_quad (filter, increment, start_filter_index, float_increment / filter->index_inc, data->data_out + filter->out_gen) ; ++ filter->out_gen += 4 ; ++ ++ /* Figure out the next index. */ ++ input_index += 1.0 / src_ratio ; ++ rem = fmod_one (input_index) ; ++ ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ } ; ++ ++ psrc->last_position = input_index ; ++ ++ /* Save current ratio rather then target ratio. */ ++ psrc->last_ratio = src_ratio ; ++ ++ data->input_frames_used = filter->in_used / filter->channels ; ++ data->output_frames_gen = filter->out_gen / filter->channels ; ++ ++ return SRC_ERR_NO_ERROR ; ++} /* sinc_quad_vari_process */ ++ ++static inline void ++calc_output_hex (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, double scale, float * output) ++{ double fraction, left [6], right [6], icoeff ; ++ increment_t filter_index, max_filter_index ; ++ int data_index, coeff_count, indx ; ++ ++ /* Convert input parameters into fixed point. */ ++ max_filter_index = int_to_fp (filter->coeff_half_len) ; ++ ++ /* First apply the left half of the filter. */ ++ filter_index = start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current - filter->channels * coeff_count ; ++ ++ left [0] = left [1] = left [2] = left [3] = left [4] = left [5] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ left [0] += icoeff * filter->buffer [data_index] ; ++ left [1] += icoeff * filter->buffer [data_index + 1] ; ++ left [2] += icoeff * filter->buffer [data_index + 2] ; ++ left [3] += icoeff * filter->buffer [data_index + 3] ; ++ left [4] += icoeff * filter->buffer [data_index + 4] ; ++ left [5] += icoeff * filter->buffer [data_index + 5] ; ++ ++ filter_index -= increment ; ++ data_index = data_index + 6 ; ++ } ++ while (filter_index >= MAKE_INCREMENT_T (0)) ; ++ ++ /* Now apply the right half of the filter. */ ++ filter_index = increment - start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current + filter->channels * (1 + coeff_count) ; ++ ++ right [0] = right [1] = right [2] = right [3] = right [4] = right [5] = 0.0 ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ right [0] += icoeff * filter->buffer [data_index] ; ++ right [1] += icoeff * filter->buffer [data_index + 1] ; ++ right [2] += icoeff * filter->buffer [data_index + 2] ; ++ right [3] += icoeff * filter->buffer [data_index + 3] ; ++ right [4] += icoeff * filter->buffer [data_index + 4] ; ++ right [5] += icoeff * filter->buffer [data_index + 5] ; ++ ++ filter_index -= increment ; ++ data_index = data_index - 6 ; ++ } ++ while (filter_index > MAKE_INCREMENT_T (0)) ; ++ ++ output [0] = scale * (left [0] + right [0]) ; ++ output [1] = scale * (left [1] + right [1]) ; ++ output [2] = scale * (left [2] + right [2]) ; ++ output [3] = scale * (left [3] + right [3]) ; ++ output [4] = scale * (left [4] + right [4]) ; ++ output [5] = scale * (left [5] + right [5]) ; ++} /* calc_output_hex */ ++ ++static int ++sinc_hex_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ++{ SINC_FILTER *filter ; ++ double input_index, src_ratio, count, float_increment, terminate, rem ; ++ increment_t increment, start_filter_index ; ++ int half_filter_chan_len, samples_in_hand ; ++ ++ if (psrc->private_data == NULL) ++ return SRC_ERR_NO_PRIVATE ; ++ ++ filter = (SINC_FILTER*) psrc->private_data ; ++ ++ /* If there is not a problem, this will be optimised out. */ ++ if (sizeof (filter->buffer [0]) != sizeof (data->data_in [0])) ++ return SRC_ERR_SIZE_INCOMPATIBILITY ; ++ ++ filter->in_count = data->input_frames * filter->channels ; ++ filter->out_count = data->output_frames * filter->channels ; ++ filter->in_used = filter->out_gen = 0 ; ++ ++ src_ratio = psrc->last_ratio ; ++ ++ /* Check the sample rate ratio wrt the buffer len. */ ++ count = (filter->coeff_half_len + 2.0) / filter->index_inc ; ++ if (MIN (psrc->last_ratio, data->src_ratio) < 1.0) ++ count /= MIN (psrc->last_ratio, data->src_ratio) ; ++ ++ /* Maximum coefficientson either side of center point. */ ++ half_filter_chan_len = filter->channels * (lrint (count) + 1) ; ++ ++ input_index = psrc->last_position ; ++ float_increment = filter->index_inc ; ++ ++ rem = fmod_one (input_index) ; ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ ++ terminate = 1.0 / src_ratio + 1e-20 ; ++ ++ /* Main processing loop. */ ++ while (filter->out_gen < filter->out_count) ++ { ++ /* Need to reload buffer? */ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ ++ if (samples_in_hand <= half_filter_chan_len) ++ { prepare_data (filter, data, half_filter_chan_len) ; ++ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ if (samples_in_hand <= half_filter_chan_len) ++ break ; ++ } ; ++ ++ /* This is the termination condition. */ ++ if (filter->b_real_end >= 0) ++ { if (filter->b_current + input_index + terminate >= filter->b_real_end) ++ break ; ++ } ; ++ ++ if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10) ++ src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ; ++ ++ float_increment = filter->index_inc * 1.0 ; ++ if (src_ratio < 1.0) ++ float_increment = filter->index_inc * src_ratio ; ++ ++ increment = double_to_fp (float_increment) ; ++ ++ start_filter_index = double_to_fp (input_index * float_increment) ; ++ ++ calc_output_hex (filter, increment, start_filter_index, float_increment / filter->index_inc, data->data_out + filter->out_gen) ; ++ filter->out_gen += 6 ; ++ ++ /* Figure out the next index. */ ++ input_index += 1.0 / src_ratio ; ++ rem = fmod_one (input_index) ; ++ ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ } ; ++ ++ psrc->last_position = input_index ; ++ ++ /* Save current ratio rather then target ratio. */ ++ psrc->last_ratio = src_ratio ; ++ ++ data->input_frames_used = filter->in_used / filter->channels ; ++ data->output_frames_gen = filter->out_gen / filter->channels ; ++ ++ return SRC_ERR_NO_ERROR ; ++} /* sinc_hex_vari_process */ ++ ++static inline void ++calc_output_multi (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, int channels, double scale, float * output) ++{ double fraction, icoeff ; ++ /* The following line is 1999 ISO Standard C. If your compiler complains, get a better compiler. */ ++ double left [channels], right [channels] ; ++ increment_t filter_index, max_filter_index ; ++ int data_index, coeff_count, indx, ch ; ++ ++ /* Convert input parameters into fixed point. */ ++ max_filter_index = int_to_fp (filter->coeff_half_len) ; ++ ++ /* First apply the left half of the filter. */ ++ filter_index = start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current - channels * coeff_count ; ++ ++ memset (left, 0, sizeof (left)) ; ++ ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ /* ++ ** Duff's Device. ++ ** See : http://en.wikipedia.org/wiki/Duff's_device ++ */ ++ ch = channels ; ++ do ++ { ++ switch (ch % 8) ++ { default : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 7 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 6 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 5 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 4 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 3 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 2 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 1 : ++ ch -- ; ++ left [ch] += icoeff * filter->buffer [data_index + ch] ; ++ } ; ++ } ++ while (ch > 0) ; ++ ++ filter_index -= increment ; ++ data_index = data_index + channels ; ++ } ++ while (filter_index >= MAKE_INCREMENT_T (0)) ; ++ ++ /* Now apply the right half of the filter. */ ++ filter_index = increment - start_filter_index ; ++ coeff_count = (max_filter_index - filter_index) / increment ; ++ filter_index = filter_index + coeff_count * increment ; ++ data_index = filter->b_current + channels * (1 + coeff_count) ; ++ ++ memset (right, 0, sizeof (right)) ; ++ do ++ { fraction = fp_to_double (filter_index) ; ++ indx = fp_to_int (filter_index) ; ++ ++ icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; ++ ++ ch = channels ; ++ do ++ { ++ switch (ch % 8) ++ { default : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 7 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 6 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 5 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 4 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 3 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 2 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ case 1 : ++ ch -- ; ++ right [ch] += icoeff * filter->buffer [data_index + ch] ; ++ } ; ++ } ++ while (ch > 0) ; ++ ++ filter_index -= increment ; ++ data_index = data_index - channels ; ++ } ++ while (filter_index > MAKE_INCREMENT_T (0)) ; ++ ++ ch = channels ; ++ do ++ { ++ switch (ch % 8) ++ { default : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 7 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 6 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 5 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 4 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 3 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 2 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ case 1 : ++ ch -- ; ++ output [ch] = scale * (left [ch] + right [ch]) ; ++ } ; ++ } ++ while (ch > 0) ; ++ ++ return ; ++} /* calc_output_multi */ ++ ++static int ++sinc_multichan_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) ++{ SINC_FILTER *filter ; ++ double input_index, src_ratio, count, float_increment, terminate, rem ; ++ increment_t increment, start_filter_index ; ++ int half_filter_chan_len, samples_in_hand ; ++ ++ if (psrc->private_data == NULL) ++ return SRC_ERR_NO_PRIVATE ; ++ ++ filter = (SINC_FILTER*) psrc->private_data ; ++ ++ /* If there is not a problem, this will be optimised out. */ ++ if (sizeof (filter->buffer [0]) != sizeof (data->data_in [0])) ++ return SRC_ERR_SIZE_INCOMPATIBILITY ; ++ ++ filter->in_count = data->input_frames * filter->channels ; ++ filter->out_count = data->output_frames * filter->channels ; ++ filter->in_used = filter->out_gen = 0 ; ++ ++ src_ratio = psrc->last_ratio ; ++ ++ /* Check the sample rate ratio wrt the buffer len. */ ++ count = (filter->coeff_half_len + 2.0) / filter->index_inc ; ++ if (MIN (psrc->last_ratio, data->src_ratio) < 1.0) ++ count /= MIN (psrc->last_ratio, data->src_ratio) ; ++ ++ /* Maximum coefficientson either side of center point. */ ++ half_filter_chan_len = filter->channels * (lrint (count) + 1) ; ++ ++ input_index = psrc->last_position ; ++ float_increment = filter->index_inc ; ++ ++ rem = fmod_one (input_index) ; ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ ++ terminate = 1.0 / src_ratio + 1e-20 ; ++ ++ /* Main processing loop. */ ++ while (filter->out_gen < filter->out_count) ++ { ++ /* Need to reload buffer? */ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ ++ if (samples_in_hand <= half_filter_chan_len) ++ { prepare_data (filter, data, half_filter_chan_len) ; ++ ++ samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ; ++ if (samples_in_hand <= half_filter_chan_len) ++ break ; ++ } ; ++ ++ /* This is the termination condition. */ ++ if (filter->b_real_end >= 0) ++ { if (filter->b_current + input_index + terminate >= filter->b_real_end) ++ break ; ++ } ; ++ ++ if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10) ++ src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ; ++ ++ float_increment = filter->index_inc * 1.0 ; ++ if (src_ratio < 1.0) ++ float_increment = filter->index_inc * src_ratio ; ++ ++ increment = double_to_fp (float_increment) ; ++ ++ start_filter_index = double_to_fp (input_index * float_increment) ; ++ ++ calc_output_multi (filter, increment, start_filter_index, filter->channels, float_increment / filter->index_inc, data->data_out + filter->out_gen) ; ++ filter->out_gen += psrc->channels ; ++ ++ /* Figure out the next index. */ ++ input_index += 1.0 / src_ratio ; ++ rem = fmod_one (input_index) ; ++ ++ filter->b_current = (filter->b_current + filter->channels * lrint (input_index - rem)) % filter->b_len ; ++ input_index = rem ; ++ } ; ++ ++ psrc->last_position = input_index ; ++ ++ /* Save current ratio rather then target ratio. */ ++ psrc->last_ratio = src_ratio ; ++ ++ data->input_frames_used = filter->in_used / filter->channels ; ++ data->output_frames_gen = filter->out_gen / filter->channels ; ++ ++ return SRC_ERR_NO_ERROR ; ++} /* sinc_multichan_vari_process */ + + /*---------------------------------------------------------------------------------------- + */ +@@ -414,55 +1186,3 @@ prepare_data (SINC_FILTER *filter, SRC_DATA *data, int half_filter_chan_len) + } /* prepare_data */ + + +-static double +-calc_output (SINC_FILTER *filter, increment_t increment, increment_t start_filter_index, int ch) +-{ double fraction, left, right, icoeff ; +- increment_t filter_index, max_filter_index ; +- int data_index, coeff_count, indx ; +- +- /* Convert input parameters into fixed point. */ +- max_filter_index = int_to_fp (filter->coeff_half_len) ; +- +- /* First apply the left half of the filter. */ +- filter_index = start_filter_index ; +- coeff_count = (max_filter_index - filter_index) / increment ; +- filter_index = filter_index + coeff_count * increment ; +- data_index = filter->b_current - filter->channels * coeff_count + ch ; +- +- left = 0.0 ; +- do +- { fraction = fp_to_double (filter_index) ; +- indx = fp_to_int (filter_index) ; +- +- icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; +- +- left += icoeff * filter->buffer [data_index] ; +- +- filter_index -= increment ; +- data_index = data_index + filter->channels ; +- } +- while (filter_index >= MAKE_INCREMENT_T (0)) ; +- +- /* Now apply the right half of the filter. */ +- filter_index = increment - start_filter_index ; +- coeff_count = (max_filter_index - filter_index) / increment ; +- filter_index = filter_index + coeff_count * increment ; +- data_index = filter->b_current + filter->channels * (1 + coeff_count) + ch ; +- +- right = 0.0 ; +- do +- { fraction = fp_to_double (filter_index) ; +- indx = fp_to_int (filter_index) ; +- +- icoeff = filter->coeffs [indx] + fraction * (filter->coeffs [indx + 1] - filter->coeffs [indx]) ; +- +- right += icoeff * filter->buffer [data_index] ; +- +- filter_index -= increment ; +- data_index = data_index - filter->channels ; +- } +- while (filter_index > MAKE_INCREMENT_T (0)) ; +- +- return (left + right) ; +-} /* calc_output */ +- +diff --git a/src/3rdparty/samplerate/src_zoh.c b/src/3rdparty/samplerate/src_zoh.c +index aa2e364..5f36d28 100644 +--- a/src/3rdparty/samplerate/src_zoh.c ++++ b/src/3rdparty/samplerate/src_zoh.c +@@ -52,41 +52,41 @@ typedef struct + + static int + zoh_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) +-{ ZOH_DATA *zoh ; ++{ ZOH_DATA *priv ; + double src_ratio, input_index, rem ; + int ch ; + + if (psrc->private_data == NULL) + return SRC_ERR_NO_PRIVATE ; + +- zoh = (ZOH_DATA*) psrc->private_data ; ++ priv = (ZOH_DATA*) psrc->private_data ; + +- if (zoh->reset) ++ if (priv->reset) + { /* If we have just been reset, set the last_value data. */ +- for (ch = 0 ; ch < zoh->channels ; ch++) +- zoh->last_value [ch] = data->data_in [ch] ; +- zoh->reset = 0 ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ priv->last_value [ch] = data->data_in [ch] ; ++ priv->reset = 0 ; + } ; + +- zoh->in_count = data->input_frames * zoh->channels ; +- zoh->out_count = data->output_frames * zoh->channels ; +- zoh->in_used = zoh->out_gen = 0 ; ++ priv->in_count = data->input_frames * priv->channels ; ++ priv->out_count = data->output_frames * priv->channels ; ++ priv->in_used = priv->out_gen = 0 ; + + src_ratio = psrc->last_ratio ; + input_index = psrc->last_position ; + + /* Calculate samples before first sample in input array. */ +- while (input_index < 1.0 && zoh->out_gen < zoh->out_count) ++ while (input_index < 1.0 && priv->out_gen < priv->out_count) + { +- if (zoh->in_used + zoh->channels * input_index >= zoh->in_count) ++ if (priv->in_used + priv->channels * input_index >= priv->in_count) + break ; + +- if (zoh->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) +- src_ratio = psrc->last_ratio + zoh->out_gen * (data->src_ratio - psrc->last_ratio) / zoh->out_count ; ++ if (priv->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) ++ src_ratio = psrc->last_ratio + priv->out_gen * (data->src_ratio - psrc->last_ratio) / priv->out_count ; + +- for (ch = 0 ; ch < zoh->channels ; ch++) +- { data->data_out [zoh->out_gen] = zoh->last_value [ch] ; +- zoh->out_gen ++ ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ { data->data_out [priv->out_gen] = priv->last_value [ch] ; ++ priv->out_gen ++ ; + } ; + + /* Figure out the next index. */ +@@ -94,44 +94,44 @@ zoh_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) + } ; + + rem = fmod_one (input_index) ; +- zoh->in_used += zoh->channels * lrint (input_index - rem) ; ++ priv->in_used += priv->channels * lrint (input_index - rem) ; + input_index = rem ; + + /* Main processing loop. */ +- while (zoh->out_gen < zoh->out_count && zoh->in_used + zoh->channels * input_index <= zoh->in_count) ++ while (priv->out_gen < priv->out_count && priv->in_used + priv->channels * input_index <= priv->in_count) + { +- if (zoh->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) +- src_ratio = psrc->last_ratio + zoh->out_gen * (data->src_ratio - psrc->last_ratio) / zoh->out_count ; ++ if (priv->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > SRC_MIN_RATIO_DIFF) ++ src_ratio = psrc->last_ratio + priv->out_gen * (data->src_ratio - psrc->last_ratio) / priv->out_count ; + +- for (ch = 0 ; ch < zoh->channels ; ch++) +- { data->data_out [zoh->out_gen] = data->data_in [zoh->in_used - zoh->channels + ch] ; +- zoh->out_gen ++ ; ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ { data->data_out [priv->out_gen] = data->data_in [priv->in_used - priv->channels + ch] ; ++ priv->out_gen ++ ; + } ; + + /* Figure out the next index. */ + input_index += 1.0 / src_ratio ; + rem = fmod_one (input_index) ; + +- zoh->in_used += zoh->channels * lrint (input_index - rem) ; ++ priv->in_used += priv->channels * lrint (input_index - rem) ; + input_index = rem ; + } ; + +- if (zoh->in_used > zoh->in_count) +- { input_index += (zoh->in_used - zoh->in_count) / zoh->channels ; +- zoh->in_used = zoh->in_count ; ++ if (priv->in_used > priv->in_count) ++ { input_index += (priv->in_used - priv->in_count) / priv->channels ; ++ priv->in_used = priv->in_count ; + } ; + + psrc->last_position = input_index ; + +- if (zoh->in_used > 0) +- for (ch = 0 ; ch < zoh->channels ; ch++) +- zoh->last_value [ch] = data->data_in [zoh->in_used - zoh->channels + ch] ; ++ if (priv->in_used > 0) ++ for (ch = 0 ; ch < priv->channels ; ch++) ++ priv->last_value [ch] = data->data_in [priv->in_used - priv->channels + ch] ; + + /* Save current ratio rather then target ratio. */ + psrc->last_ratio = src_ratio ; + +- data->input_frames_used = zoh->in_used / zoh->channels ; +- data->output_frames_gen = zoh->out_gen / zoh->channels ; ++ data->input_frames_used = priv->in_used / priv->channels ; ++ data->output_frames_gen = priv->out_gen / priv->channels ; + + return SRC_ERR_NO_ERROR ; + } /* zoh_vari_process */ +@@ -159,28 +159,25 @@ zoh_get_description (int src_enum) + + int + zoh_set_converter (SRC_PRIVATE *psrc, int src_enum) +-{ ZOH_DATA *zoh = NULL ; ++{ ZOH_DATA *priv = NULL ; + + if (src_enum != SRC_ZERO_ORDER_HOLD) + return SRC_ERR_BAD_CONVERTER ; + + if (psrc->private_data != NULL) +- { zoh = (ZOH_DATA*) psrc->private_data ; +- if (zoh->zoh_magic_marker != ZOH_MAGIC_MARKER) +- { free (psrc->private_data) ; +- psrc->private_data = NULL ; +- } ; ++ { free (psrc->private_data) ; ++ psrc->private_data = NULL ; + } ; + + if (psrc->private_data == NULL) +- { zoh = calloc (1, sizeof (*zoh) + psrc->channels * sizeof (float)) ; +- if (zoh == NULL) ++ { priv = calloc (1, sizeof (*priv) + psrc->channels * sizeof (float)) ; ++ if (priv == NULL) + return SRC_ERR_MALLOC_FAILED ; +- psrc->private_data = zoh ; ++ psrc->private_data = priv ; + } ; + +- zoh->zoh_magic_marker = ZOH_MAGIC_MARKER ; +- zoh->channels = psrc->channels ; ++ priv->zoh_magic_marker = ZOH_MAGIC_MARKER ; ++ priv->channels = psrc->channels ; + + psrc->const_process = zoh_vari_process ; + psrc->vari_process = zoh_vari_process ; +@@ -196,15 +193,15 @@ zoh_set_converter (SRC_PRIVATE *psrc, int src_enum) + + static void + zoh_reset (SRC_PRIVATE *psrc) +-{ ZOH_DATA *zoh ; ++{ ZOH_DATA *priv ; + +- zoh = (ZOH_DATA*) psrc->private_data ; +- if (zoh == NULL) ++ priv = (ZOH_DATA*) psrc->private_data ; ++ if (priv == NULL) + return ; + +- zoh->channels = psrc->channels ; +- zoh->reset = 1 ; +- memset (zoh->last_value, 0, sizeof (zoh->last_value [0]) * zoh->channels) ; ++ priv->channels = psrc->channels ; ++ priv->reset = 1 ; ++ memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; + + return ; + } /* zoh_reset */ +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0045-PatternView-if-volume-of-a-step-is-95-it-was-not-po.patch +++ lmms-0.4.2/debian/patches/0045-PatternView-if-volume-of-a-step-is-95-it-was-not-po.patch @@ -0,0 +1,29 @@ +From a6fbb8bb2dc47761833a23fec484e082e431b7d9 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Wed, 4 Mar 2009 19:00:04 +0100 +Subject: [PATCH] PatternView: if volume of a step is 95 it was not possible to increase + it to 100 by scrolling up (closes #2656024) + +Backported from fa3d004f42f15282f1dc4b9cb15f2ed8b20d0854 (master) +--- + src/tracks/pattern.cpp | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp +index 8bba198..d732e8d 100644 +--- a/src/tracks/pattern.cpp ++++ b/src/tracks/pattern.cpp +@@ -1086,6 +1086,10 @@ void patternView::wheelEvent( QWheelEvent * _we ) + { + n->setVolume( vol + 5 ); + } ++ else ++ { ++ n->setVolume( 100 ); ++ } + } + else + { +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0003-stable-backport-of-various-fixes-from-trunk.patch +++ lmms-0.4.2/debian/patches/0003-stable-backport-of-various-fixes-from-trunk.patch @@ -0,0 +1,106 @@ +From 8b3d3f33a7ca3a5cde955fef9d4d6ac166ebf87a Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Tue, 27 Jan 2009 00:21:37 +0000 +Subject: [PATCH] stable backport of various fixes from trunk + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1972 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 15 +++++++++++++++ + plugins/flp_import/unrtf/convert.c | 2 +- + plugins/flp_import/unrtf/html.c | 2 +- + plugins/flp_import/unrtf/output.h | 2 +- + src/gui/widgets/knob.cpp | 2 +- + src/tracks/bb_track.cpp | 2 +- + 6 files changed, 20 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 91e5cbe..6a08d19 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,18 @@ ++2009-01-25 Paul Giblock ++ ++ * src/tracks/bb_track.cpp: ++ Integrate broken BB-clone bug from pitanga ++ ++2009-01-25 Paul Giblock ++ ++ * src/gui/widgets/knob.cpp: ++ Fix infinite recursion on Mac OSX ++ ++ * plugins/flp_import/unrtf/html.c: ++ * plugins/flp_import/unrtf/output.h: ++ * plugins/flp_import/unrtf/convert.c: ++ Avoid compile warnings ++ + 2008-12-22 Tobias Doerffel + + * CMakeLists.txt: +diff --git a/plugins/flp_import/unrtf/convert.c b/plugins/flp_import/unrtf/convert.c +index 87892a3..03b8165 100644 +--- a/plugins/flp_import/unrtf/convert.c ++++ b/plugins/flp_import/unrtf/convert.c +@@ -2399,7 +2399,7 @@ static int cmd_ansi (Word *w, int align, char has_param, int param) { + *=======================================================================*/ + + static int cmd_ansicpg (Word *w, int align, char has_param, int param) { +- int i; ++ unsigned int i; + for (i = 0; i < sizeof(codepages) / sizeof(CodepageInfo); i ++) { + charset_codepage = &codepages[i]; + if (charset_codepage->cp == param) { +diff --git a/plugins/flp_import/unrtf/html.c b/plugins/flp_import/unrtf/html.c +index 69661db..752c588 100644 +--- a/plugins/flp_import/unrtf/html.c ++++ b/plugins/flp_import/unrtf/html.c +@@ -877,7 +877,7 @@ static const char* cp850 [] = { + /* 0xff */ " ", + }; + #if 1 /* daved - 0.20.3 */ +-static char * Greek[] = ++static const char * Greek[] = + { + /* 0x80 */ "ç", + /* 0x81 */ "ü", +diff --git a/plugins/flp_import/unrtf/output.h b/plugins/flp_import/unrtf/output.h +index 1ea6b4e..10ef2a3 100644 +--- a/plugins/flp_import/unrtf/output.h ++++ b/plugins/flp_import/unrtf/output.h +@@ -285,7 +285,7 @@ typedef struct { + #if 1 /* daved 0.20.3 GREEK font support */ + short greek_first_char; + short greek_last_char; +- char **greek_translation_table; ++ const char **greek_translation_table; + #endif + + char *(*unisymbol_print) (unsigned short); +diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp +index eb1c511..7aed4ae 100644 +--- a/src/gui/widgets/knob.cpp ++++ b/src/gui/widgets/knob.cpp +@@ -474,7 +474,7 @@ void knob::mousePressEvent( QMouseEvent * _me ) + + void knob::mouseMoveEvent( QMouseEvent * _me ) + { +- if( m_buttonPressed == TRUE ) ++ if( m_buttonPressed == TRUE && _me->pos() != m_origMousePos ) + { + setPosition( _me->pos() ); + emit sliderMoved( model()->value() ); +diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp +index 52831f1..0761eb2 100644 +--- a/src/tracks/bb_track.cpp ++++ b/src/tracks/bb_track.cpp +@@ -455,7 +455,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) + + if( _this.hasAttribute( "clonebbt" ) ) + { +- const int src = _this.attribute( "clonebb" ).toInt(); ++ const int src = _this.attribute( "clonebbt" ).toInt(); + const int dst = s_infoMap[this]; + engine::getBBTrackContainer()->createTCOsForBB( dst ); + trackContainer::trackList tl = +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0021-fix-misloaded-samples.patch +++ lmms-0.4.2/debian/patches/0021-fix-misloaded-samples.patch @@ -0,0 +1,489 @@ +From e5dddeffb05b3f0555a0f737f8964f90ed4fc856 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 16:37:15 +0000 +Subject: [PATCH] stable backport: + * when resampling whole sampleBuffer, set end_of_input = 1 in libsamplerate data struct - fixes lots of zero samples at the end of output buffer (closes #2531452) + * coding style fixes + * removed obsolete save/restore of EOF-property in libsample rate data struct when resampling successively (always use 0) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2040 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 9 ++++ + include/sample_buffer.h | 27 ++++++------- + src/core/sample_buffer.cpp | 90 +++++++++++++++++++++---------------------- + 3 files changed, 66 insertions(+), 60 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index c998ae9..50a1656 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,14 @@ + 2009-02-13 Tobias Doerffel + ++ * include/sample_buffer.h: ++ * src/core/sample_buffer.cpp: ++ - when resampling whole sampleBuffer, set end_of_input = 1 in ++ libsamplerate data struct - fixes lots of zero samples at the end ++ of output buffer (closes #2531452) ++ - coding style fixes ++ - removed obsolete save/restore of EOF-property in libsample rate ++ data struct when resampling successively (always use 0) ++ + * src/3rdparty/samplerate/src_linear.c: + * src/3rdparty/samplerate/samplerate.h: + * src/3rdparty/samplerate/src_sinc.c: +diff --git a/include/sample_buffer.h b/include/sample_buffer.h +index b637b29..6dbfa07 100644 +--- a/include/sample_buffer.h ++++ b/include/sample_buffer.h +@@ -1,7 +1,7 @@ + /* + * sample_buffer.h - container-class sampleBuffer + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -57,7 +57,6 @@ public: + f_cnt_t m_frameIndex; + const bool m_varyingPitch; + SRC_STATE * m_resamplingData; +- int m_eof; + + friend class sampleBuffer; + +@@ -86,17 +85,17 @@ public: + + inline const QString & audioFile( void ) const + { +- return( m_audioFile ); ++ return m_audioFile; + } + + inline f_cnt_t startFrame( void ) const + { +- return( m_startFrame ); ++ return m_startFrame; + } + + inline f_cnt_t endFrame( void ) const + { +- return( m_endFrame ); ++ return m_endFrame; + } + + void setLoopStartFrame( f_cnt_t _start ) +@@ -115,22 +114,22 @@ public: + + inline f_cnt_t frames( void ) const + { +- return( m_frames ); ++ return m_frames; + } + + inline float amplification( void ) const + { +- return( m_amplification ); ++ return m_amplification; + } + + inline bool reversed( void ) const + { +- return( m_reversed ); ++ return m_reversed; + } + + inline float frequency( void ) const + { +- return( m_frequency ); ++ return m_frequency; + } + + inline void setFrequency( float _freq ) +@@ -149,7 +148,7 @@ public: + + inline const sampleFrame * data( void ) const + { +- return( m_data ); ++ return m_data; + } + + QString openAudioFile( void ) const; +@@ -166,8 +165,8 @@ public: + const sample_rate_t _src_sr, + const sample_rate_t _dst_sr ) + { +- return( resample( _buf->m_data, _buf->m_frames, _src_sr, +- _dst_sr ) ); ++ return resample( _buf->m_data, _buf->m_frames, _src_sr, ++ _dst_sr ); + } + + void normalizeSampleRate( const sample_rate_t _src_sr, +@@ -182,7 +181,7 @@ public: + // sample_t waveSample = linearInterpolate( m_data[f1][0], + // m_data[f2][0], + // fraction( frame ) ); +-// return( waveSample ); ++// return waveSample; + + // Fast implementation + const float frame = _sample * m_frames; +@@ -191,7 +190,7 @@ public: + { + f1 += m_frames; + } +- return( m_data[f1][0] ); ++ return m_data[f1][0]; + } + + static QString tryToMakeRelative( const QString & _file ); +diff --git a/src/core/sample_buffer.cpp b/src/core/sample_buffer.cpp +index 7b474c6..3116605 100644 +--- a/src/core/sample_buffer.cpp ++++ b/src/core/sample_buffer.cpp +@@ -165,7 +165,7 @@ void sampleBuffer::update( bool _keep_settings ) + delete[] m_data; + } + +- if( m_audioFile == "" && m_origData != NULL && m_origFrames > 0 ) ++ if( m_audioFile.isEmpty() && m_origData != NULL && m_origFrames > 0 ) + { + // TODO: reverse- and amplification-property is not covered + // by following code... +@@ -346,7 +346,7 @@ f_cnt_t sampleBuffer::decodeSampleSF( const char * _f, + "sample %s: %s\n", _f, sf_strerror( NULL ) ); + #endif + } +- return( frames ); ++ return frames; + } + + +@@ -358,8 +358,8 @@ f_cnt_t sampleBuffer::decodeSampleSF( const char * _f, + + size_t qfileReadCallback( void * _ptr, size_t _size, size_t _n, void * _udata ) + { +- return( static_cast( _udata )->read( (char*) _ptr, +- _size * _n ) ); ++ return static_cast( _udata )->read( (char*) _ptr, ++ _size * _n ); + } + + +@@ -381,7 +381,7 @@ int qfileSeekCallback( void * _udata, ogg_int64_t _offset, int _whence ) + { + f->seek( _offset ); + } +- return( 0 ); ++ return 0; + } + + +@@ -390,7 +390,7 @@ int qfileSeekCallback( void * _udata, ogg_int64_t _offset, int _whence ) + int qfileCloseCallback( void * _udata ) + { + delete static_cast( _udata ); +- return( 0 ); ++ return 0; + } + + +@@ -398,7 +398,7 @@ int qfileCloseCallback( void * _udata ) + + long qfileTellCallback( void * _udata ) + { +- return( static_cast( _udata )->pos() ); ++ return static_cast( _udata )->pos(); + } + + +@@ -425,7 +425,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f, + if( f->open( QFile::ReadOnly ) == false ) + { + delete f; +- return( 0 ); ++ return 0; + } + + int err = ov_open_callbacks( f, &vf, NULL, 0, callbacks ); +@@ -456,7 +456,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f, + break; + } + delete f; +- return( 0 ); ++ return 0; + } + + ov_pcm_seek( &vf, 0 ); +@@ -487,7 +487,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f, + + ov_clear( &vf ); + +- return( frames ); ++ return frames; + } + #endif + +@@ -500,7 +500,7 @@ f_cnt_t sampleBuffer::decodeSampleDS( const char * _f, + sample_rate_t & _samplerate ) + { + DrumSynth ds; +- return( ds.GetDSFileSamples( _f, _buf, _channels ) ); ++ return ds.GetDSFileSamples( _f, _buf, _channels ); + } + + +@@ -517,7 +517,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + + if( m_endFrame == 0 || _frames == 0 ) + { +- return( false ); ++ return false; + } + + const double freq_factor = (double) _freq / (double) m_frequency * +@@ -529,7 +529,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + freq_factor ); + if( total_frames_for_current_pitch == 0 ) + { +- return( false ); ++ return false; + } + + // this holds the number of the first frame to play +@@ -552,14 +552,14 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + { + if( play_frame >= m_endFrame ) + { +- return( false ); ++ return false; + } + frames_for_loop = static_cast( + ( m_endFrame - play_frame ) / + freq_factor ); + if( frames_for_loop == 0 ) + { +- return( false ); ++ return false; + } + } + +@@ -579,7 +579,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + src_data.input_frames = fragment_size; + src_data.output_frames = _frames; + src_data.src_ratio = 1.0 / freq_factor; +- src_data.end_of_input = _state->m_eof; ++ src_data.end_of_input = 0; + int error = src_process( _state->m_resamplingData, + &src_data ); + if( error ) +@@ -592,7 +592,6 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + printf( "sampleBuffer: not enough frames: %ld / %d\n", + src_data.output_frames_gen, _frames ); + } +- _state->m_eof = src_data.end_of_input; + // Advance + play_frame += src_data.input_frames_used; + if( _looped ) +@@ -621,7 +620,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + + _state->m_frameIndex = play_frame; + +- return( true ); ++ return true; + + } + +@@ -635,14 +634,14 @@ sampleFrame * sampleBuffer::getSampleFragment( f_cnt_t _start, + { + if( _start + _frames <= m_loopEndFrame ) + { +- return( m_data + _start ); ++ return m_data + _start; + } + } + else + { + if( _start + _frames <= m_endFrame ) + { +- return( m_data + _start ); ++ return m_data + _start; + } + } + +@@ -669,7 +668,7 @@ sampleFrame * sampleBuffer::getSampleFragment( f_cnt_t _start, + BYTES_PER_FRAME ); + } + +- return( *_tmp ); ++ return *_tmp; + } + + +@@ -679,10 +678,10 @@ f_cnt_t sampleBuffer::getLoopedIndex( f_cnt_t _index ) const + { + if( _index < m_loopEndFrame ) + { +- return( _index ); ++ return _index; + } +- return( m_loopStartFrame + ( _index - m_loopStartFrame ) +- % ( m_loopEndFrame - m_loopStartFrame ) ); ++ return m_loopStartFrame + ( _index - m_loopStartFrame ) ++ % ( m_loopEndFrame - m_loopStartFrame ); + } + + +@@ -779,12 +778,12 @@ QString sampleBuffer::openAudioFile( void ) const + { + if( ofd.selectedFiles().isEmpty() ) + { +- return( "" ); ++ return QString::null; + } +- return( tryToMakeRelative( ofd.selectedFiles()[0] ) ); ++ return tryToMakeRelative( ofd.selectedFiles()[0] ); + } + +- return( "" ); ++ return QString::null; + } + + +@@ -803,13 +802,13 @@ FLAC__StreamEncoderWriteStatus flacStreamEncoderWriteCallback( + { + /* if( _bytes == 0 ) + { +- return( FLAC__STREAM_ENCODER_WRITE_STATUS_OK ); ++ return FLAC__STREAM_ENCODER_WRITE_STATUS_OK; + }*/ +- return( ( static_cast( _client_data )->write( ++ return ( static_cast( _client_data )->write( + (const char *) _buffer, _bytes ) == + (int) _bytes ) ? + FLAC__STREAM_ENCODER_WRITE_STATUS_OK : +- FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR ); ++ FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR; + } + + +@@ -885,7 +884,7 @@ QString & sampleBuffer::toBase64( QString & _dst ) const + + #endif /* LMMS_HAVE_FLAC_STREAM_ENCODER_H */ + +- return( _dst ); ++ return _dst; + } + + +@@ -908,7 +907,7 @@ sampleBuffer * sampleBuffer::resample( sampleFrame * _data, + DEFAULT_CHANNELS, &error ) ) != NULL ) + { + SRC_DATA src_data; +- src_data.end_of_input = 0; ++ src_data.end_of_input = 1; + src_data.data_in = _data[0]; + src_data.data_out = dst_buf[0]; + src_data.input_frames = _frames; +@@ -926,7 +925,7 @@ sampleBuffer * sampleBuffer::resample( sampleFrame * _data, + printf( "Error: src_new() failed in sample_buffer.cpp!\n" ); + } + dst_sb->update(); +- return( dst_sb ); ++ return dst_sb; + } + + +@@ -964,11 +963,11 @@ FLAC__StreamDecoderReadStatus flacStreamDecoderReadCallback( + if( res > 0 ) + { + *_bytes = res; +- return( FLAC__STREAM_DECODER_READ_STATUS_CONTINUE ); ++ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; + + } + *_bytes = 0; +- return( FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM ); ++ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; + } + + +@@ -985,14 +984,14 @@ FLAC__StreamDecoderWriteStatus flacStreamDecoderWriteCallback( + { + printf( "channels != 2 in " + "flacStreamDecoderWriteCallback()\n" ); +- return( FLAC__STREAM_DECODER_WRITE_STATUS_ABORT ); ++ return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; + } + + if( _frame->header.bits_per_sample != 16 ) + { + printf( "bits_per_sample != 16 in " + "flacStreamDecoderWriteCallback()\n" ); +- return( FLAC__STREAM_DECODER_WRITE_STATUS_ABORT ); ++ return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; + } + + const f_cnt_t frames = _frame->header.blocksize; +@@ -1007,7 +1006,7 @@ FLAC__StreamDecoderWriteStatus flacStreamDecoderWriteCallback( + _client_data )->write_buffer->write( + (const char *) sframe, sizeof( sframe ) ); + } +- return( FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE ); ++ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; + } + + +@@ -1146,14 +1145,14 @@ QString sampleBuffer::tryToMakeRelative( const QString & _file ) + usd.replace( QDir::separator(), '/' ); + if( f.startsWith( fsd ) ) + { +- return( QString( f ).mid( fsd.length() ) ); ++ return QString( f ).mid( fsd.length() ); + } + else if( f.startsWith( usd ) ) + { +- return( QString( f ).mid( usd.length() ) ); ++ return QString( f ).mid( usd.length() ); + } + } +- return( _file ); ++ return _file; + } + + +@@ -1163,16 +1162,16 @@ QString sampleBuffer::tryToMakeAbsolute( const QString & _file ) + { + if( QFileInfo( _file ).isAbsolute() ) + { +- return( _file ); ++ return _file; + } + + QString f = configManager::inst()->userSamplesDir() + _file; + if( QFileInfo( f ).exists() ) + { +- return( f ); ++ return f; + } + +- return( configManager::inst()->factorySamplesDir() + _file ); ++ return configManager::inst()->factorySamplesDir() + _file; + } + + +@@ -1184,8 +1183,7 @@ QString sampleBuffer::tryToMakeAbsolute( const QString & _file ) + + sampleBuffer::handleState::handleState( bool _varying_pitch ) : + m_frameIndex( 0 ), +- m_varyingPitch( _varying_pitch ), +- m_eof( 0 ) ++ m_varyingPitch( _varying_pitch ) + { + int error; + if( ( m_resamplingData = src_new(/* +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0049-MIDI-subsystem-fixed-misspelled-writeable-into-w.patch +++ lmms-0.4.2/debian/patches/0049-MIDI-subsystem-fixed-misspelled-writeable-into-w.patch @@ -0,0 +1,446 @@ +From 2b033627e64b5167e7f0daac426205c60a936ee5 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Mar 2009 01:09:32 +0100 +Subject: [PATCH] MIDI subsystem: fixed misspelled "writeable" into "writable", minor + coding style fixes + (cherry picked from commit 94d13e84cab0a79912bb92d2f92f0d18ed0d647a) + +--- + include/midi_alsa_seq.h | 14 +++++++------- + include/midi_client.h | 8 ++++---- + include/midi_port.h | 8 ++++---- + include/midi_winmm.h | 10 +++++----- + src/core/midi/midi_alsa_seq.cpp | 16 ++++++++-------- + src/core/midi/midi_client.cpp | 4 ++-- + src/core/midi/midi_port.cpp | 20 ++++++++++---------- + src/core/midi/midi_winmm.cpp | 12 ++++++------ + src/gui/widgets/midi_port_menu.cpp | 6 +++--- + 9 files changed, 49 insertions(+), 49 deletions(-) + +diff --git a/include/midi_alsa_seq.h b/include/midi_alsa_seq.h +index 6c06e6e..0096b91 100644 +--- a/include/midi_alsa_seq.h ++++ b/include/midi_alsa_seq.h +@@ -1,7 +1,7 @@ + /* + * midi_alsa_seq.h - ALSA-sequencer-client + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -78,16 +78,16 @@ public: + return( m_readablePorts ); + } + +- virtual QStringList writeablePorts( void ) const ++ virtual QStringList writeblePorts( void ) const + { +- return( m_writeablePorts ); ++ return m_writablePorts; + } + + // (un)subscribe given midiPort to/from destination-port + virtual void subscribeReadablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); +- virtual void subscribeWriteablePort( midiPort * _port, ++ virtual void subscribeWritablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); + virtual void connectRPChanged( QObject * _receiver, +@@ -100,7 +100,7 @@ public: + virtual void connectWPChanged( QObject * _receiver, + const char * _member ) + { +- connect( this, SIGNAL( writeablePortsChanged() ), ++ connect( this, SIGNAL( writablePortsChanged() ), + _receiver, _member ); + } + +@@ -144,14 +144,14 @@ private: + + QTimer m_portListUpdateTimer; + QStringList m_readablePorts; +- QStringList m_writeablePorts; ++ QStringList m_writablePorts; + + int m_pipe[2]; + + + signals: + void readablePortsChanged( void ); +- void writeablePortsChanged( void ); ++ void writablePortsChanged( void ); + + } ; + +diff --git a/include/midi_client.h b/include/midi_client.h +index 57b61aa..36f23da 100644 +--- a/include/midi_client.h ++++ b/include/midi_client.h +@@ -1,7 +1,7 @@ + /* + * midi_client.h - base-class for MIDI-clients like ALSA-sequencer-client + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -68,12 +68,12 @@ public: + return( FALSE ); + } + +- // if not raw-client, return all readable/writeable ports ++ // if not raw-client, return all readable/writable ports + virtual QStringList readablePorts( void ) const + { + return QStringList(); + } +- virtual QStringList writeablePorts( void ) const ++ virtual QStringList writablePorts( void ) const + { + return QStringList(); + } +@@ -82,7 +82,7 @@ public: + virtual void subscribeReadablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); +- virtual void subscribeWriteablePort( midiPort * _port, ++ virtual void subscribeWritablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); + +diff --git a/include/midi_port.h b/include/midi_port.h +index 05847e1..272c35c 100644 +--- a/include/midi_port.h ++++ b/include/midi_port.h +@@ -2,7 +2,7 @@ + * midi_port.h - abstraction of MIDI-ports which are part of LMMS's MIDI- + * sequencing system + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -113,7 +113,7 @@ public: + + void subscribeReadablePort( const QString & _port, + bool _subscribe = TRUE ); +- void subscribeWriteablePort( const QString & _port, ++ void subscribeWritablePort( const QString & _port, + bool _subscribe = TRUE ); + + const map & readablePorts( void ) const +@@ -136,7 +136,7 @@ public slots: + + private slots: + void updateReadablePorts( void ); +- void updateWriteablePorts( void ); ++ void updateWritablePorts( void ); + void updateOutputProgram( void ); + + +@@ -166,7 +166,7 @@ private: + + signals: + void readablePortsChanged( void ); +- void writeablePortsChanged( void ); ++ void writablePortsChanged( void ); + void modeChanged( void ); + + +diff --git a/include/midi_winmm.h b/include/midi_winmm.h +index 8d1836d..941fd9e 100644 +--- a/include/midi_winmm.h ++++ b/include/midi_winmm.h +@@ -1,7 +1,7 @@ + /* + * midi_winmm.h - WinMM MIDI client + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -72,7 +72,7 @@ public: + return( m_inputDevices.values() ); + } + +- virtual QStringList writeablePorts( void ) const ++ virtual QStringList writeblePorts( void ) const + { + return( m_outputDevices.values() ); + } +@@ -82,7 +82,7 @@ public: + virtual void subscribeReadablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); +- virtual void subscribeWriteablePort( midiPort * _port, ++ virtual void subscribeWritablePort( midiPort * _port, + const QString & _dest, + bool _subscribe = TRUE ); + virtual void connectRPChanged( QObject * _receiver, +@@ -95,7 +95,7 @@ public: + virtual void connectWPChanged( QObject * _receiver, + const char * _member ) + { +- connect( this, SIGNAL( writeablePortsChanged() ), ++ connect( this, SIGNAL( writablePortsChanged() ), + _receiver, _member ); + } + +@@ -145,7 +145,7 @@ private: + + signals: + void readablePortsChanged( void ); +- void writeablePortsChanged( void ); ++ void writablePortsChanged( void ); + + } ; + +diff --git a/src/core/midi/midi_alsa_seq.cpp b/src/core/midi/midi_alsa_seq.cpp +index 38d28a4..d8090cf 100644 +--- a/src/core/midi/midi_alsa_seq.cpp ++++ b/src/core/midi/midi_alsa_seq.cpp +@@ -3,7 +3,7 @@ + /* + * midi_alsa_seq.cpp - ALSA-sequencer-client + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -350,7 +350,7 @@ void midiALSASeq::subscribeReadablePort( midiPort * _port, + + + +-void midiALSASeq::subscribeWriteablePort( midiPort * _port, ++void midiALSASeq::subscribeWritablePort( midiPort * _port, + const QString & _dest, + bool _subscribe ) + { +@@ -544,7 +544,7 @@ void midiALSASeq::changeQueueTempo( bpm_t _bpm ) + void midiALSASeq::updatePortList( void ) + { + QStringList readable_ports; +- QStringList writeable_ports; ++ QStringList writable_ports; + + // get input- and output-ports + snd_seq_client_info_t * cinfo; +@@ -586,7 +586,7 @@ void midiALSASeq::updatePortList( void ) + ( SND_SEQ_PORT_CAP_WRITE | + SND_SEQ_PORT_CAP_SUBS_WRITE ) ) + { +- writeable_ports.push_back( ++ writable_ports.push_back( + QString( "%1:%2 %3:%4" ). + arg( snd_seq_port_info_get_client( + pinfo ) ). +@@ -606,13 +606,13 @@ void midiALSASeq::updatePortList( void ) + if( m_readablePorts != readable_ports ) + { + m_readablePorts = readable_ports; +- emit( readablePortsChanged() ); ++ emit readablePortsChanged(); + } + +- if( m_writeablePorts != writeable_ports ) ++ if( m_writablePorts != writable_ports ) + { +- m_writeablePorts = writeable_ports; +- emit( writeablePortsChanged() ); ++ m_writablePorts = writable_ports; ++ emit writablePortsChanged(); + } + } + +diff --git a/src/core/midi/midi_client.cpp b/src/core/midi/midi_client.cpp +index 1298292..e74f0fc 100644 +--- a/src/core/midi/midi_client.cpp ++++ b/src/core/midi/midi_client.cpp +@@ -3,7 +3,7 @@ + /* + * midi_client.cpp - base-class for MIDI-clients like ALSA-sequencer-client + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * This file partly contains code from Fluidsynth, Peter Hanappe + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net +@@ -94,7 +94,7 @@ void midiClient::subscribeReadablePort( midiPort *, const QString & , bool ) + + + +-void midiClient::subscribeWriteablePort( midiPort * , const QString & , bool) ++void midiClient::subscribeWritablePort( midiPort * , const QString & , bool ) + { + } + +diff --git a/src/core/midi/midi_port.cpp b/src/core/midi/midi_port.cpp +index d8035f7..b882108 100644 +--- a/src/core/midi/midi_port.cpp ++++ b/src/core/midi/midi_port.cpp +@@ -76,13 +76,13 @@ midiPort::midiPort( const QString & _name, midiClient * _mc, + if( m_midiClient->isRaw() == false ) + { + updateReadablePorts(); +- updateWriteablePorts(); ++ updateWritablePorts(); + + // we want to get informed about port-changes! + m_midiClient->connectRPChanged( this, + SLOT( updateReadablePorts() ) ); + m_midiClient->connectWPChanged( this, +- SLOT( updateWriteablePorts() ) ); ++ SLOT( updateWritablePorts() ) ); + } + + updateMidiPortMode(); +@@ -269,7 +269,7 @@ void midiPort::loadSettings( const QDomElement & _this ) + subscribeReadablePort( it.key() ); + } + } +- emit writeablePortsChanged(); ++ emit writablePortsChanged(); + } + } + +@@ -290,7 +290,7 @@ void midiPort::subscribeReadablePort( const QString & _port, bool _subscribe ) + + + +-void midiPort::subscribeWriteablePort( const QString & _port, bool _subscribe ) ++void midiPort::subscribeWritablePort( const QString & _port, bool _subscribe ) + { + m_writablePorts[_port] = _subscribe; + // make sure, MIDI-port is configured for output +@@ -298,7 +298,7 @@ void midiPort::subscribeWriteablePort( const QString & _port, bool _subscribe ) + { + m_writableModel.setValue( true ); + } +- m_midiClient->subscribeWriteablePort( this, _port, _subscribe ); ++ m_midiClient->subscribeWritablePort( this, _port, _subscribe ); + } + + +@@ -336,13 +336,13 @@ void midiPort::updateMidiPortMode( void ) + // subscribed? + if( it.value() ) + { +- subscribeWriteablePort( it.key(), false ); ++ subscribeWritablePort( it.key(), false ); + } + } + } + + emit readablePortsChanged(); +- emit writeablePortsChanged(); ++ emit writablePortsChanged(); + emit modeChanged(); + + engine::getSong()->setModified(); +@@ -377,7 +377,7 @@ void midiPort::updateReadablePorts( void ) + + + +-void midiPort::updateWriteablePorts( void ) ++void midiPort::updateWritablePorts( void ) + { + // first save all selected ports + QStringList selected_ports; +@@ -391,13 +391,13 @@ void midiPort::updateWriteablePorts( void ) + } + + m_writablePorts.clear(); +- const QStringList & wp = m_midiClient->writeablePorts(); ++ const QStringList & wp = m_midiClient->writablePorts(); + // now insert new ports and restore selections + for( QStringList::const_iterator it = wp.begin(); it != wp.end(); ++it ) + { + m_writablePorts[*it] = ( selected_ports.indexOf( *it ) != -1 ); + } +- emit writeablePortsChanged(); ++ emit writablePortsChanged(); + } + + +diff --git a/src/core/midi/midi_winmm.cpp b/src/core/midi/midi_winmm.cpp +index 114090e..86d67a9 100644 +--- a/src/core/midi/midi_winmm.cpp ++++ b/src/core/midi/midi_winmm.cpp +@@ -1,7 +1,7 @@ + /* + * midi_winmm.cpp - WinMM MIDI client + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -160,7 +160,7 @@ void midiWinMM::subscribeReadablePort( midiPort * _port, + + + +-void midiWinMM::subscribeWriteablePort( midiPort * _port, ++void midiWinMM::subscribeWritablePort( midiPort * _port, + const QString & _dest, + bool _subscribe ) + { +@@ -260,13 +260,13 @@ void midiWinMM::updateDeviceList( void ) + // if( m_readablePorts != readable_ports ) + { + // m_readablePorts = readable_ports; +- emit( readablePortsChanged() ); ++ emit readablePortsChanged(); + } + +-// if( m_writeablePorts != writeable_ports ) ++// if( m_writablePorts != writable_ports ) + { +-// m_writeablePorts = writeable_ports; +- emit( writeablePortsChanged() ); ++// m_writablePorts = writable_ports; ++ emit writablePortsChanged(); + } + } + +diff --git a/src/gui/widgets/midi_port_menu.cpp b/src/gui/widgets/midi_port_menu.cpp +index 4c164c6..84acc94 100644 +--- a/src/gui/widgets/midi_port_menu.cpp ++++ b/src/gui/widgets/midi_port_menu.cpp +@@ -2,7 +2,7 @@ + * midi_port_menu.cpp - a menu for subscribing a midiPort to several external + * MIDI ports + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -58,7 +58,7 @@ void midiPortMenu::modelChanged( void ) + } + else if( m_mode == midiPort::Output ) + { +- connect( mp, SIGNAL( writeablePortsChanged() ), ++ connect( mp, SIGNAL( writablePortsChanged() ), + this, SLOT( updatePorts() ) ); + } + updatePorts(); +@@ -76,7 +76,7 @@ void midiPortMenu::activatedPort( QAction * _item ) + } + else if( m_mode == midiPort::Output ) + { +- castModel()->subscribeWriteablePort( _item->text(), ++ castModel()->subscribeWritablePort( _item->text(), + _item->isChecked() ); + } + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0004-reworked-mixer-threads-synchronization-realization.patch +++ lmms-0.4.2/debian/patches/0004-reworked-mixer-threads-synchronization-realization.patch @@ -0,0 +1,629 @@ +From b3c9bf011b34b49080b21e7125732abe1cb93535 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 5 Feb 2009 09:03:13 +0000 +Subject: [PATCH] reworked mixer-threads (synchronization, realization of jobqueue etc.) which results in a much better performance and stability + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1996 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 9 ++ + include/atomic_int.h | 97 ++++++++++++++++++++ + include/audio_port.h | 4 +- + include/mixer.h | 13 +-- + src/core/mixer.cpp | 247 ++++++++++++++++++++++++++------------------------ + 5 files changed, 241 insertions(+), 129 deletions(-) + create mode 100755 include/atomic_int.h + +diff --git a/ChangeLog b/ChangeLog +index 6a08d19..e42f356 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,12 @@ ++2009-02-04 Tobias Doerffel ++ ++ * include/atomic_int.h: ++ * include/audio_port.h: ++ * include/mixer.h: ++ * src/core/mixer.cpp: ++ reworked mixer-threads (synchronization, realization of jobqueue etc.) ++ which results in a much better performance and stability ++ + 2009-01-25 Paul Giblock + + * src/tracks/bb_track.cpp: +diff --git a/include/atomic_int.h b/include/atomic_int.h +new file mode 100755 +index 0000000..f6a835b +--- /dev/null ++++ b/include/atomic_int.h +@@ -0,0 +1,97 @@ ++/* ++ * atomic_int.h - fallback AtomicInt class when Qt is too old ++ * ++ * Copyright (c) 2009 Tobias Doerffel ++ * ++ * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this program (see COPYING); if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#ifndef _ATOMIC_INT_H ++#define _ATOMIC_INT_H ++ ++#include ++ ++#if QT_VERSION > 0x040400 ++ ++typedef QAtomicInt AtomicInt; ++ ++#else ++// implement our own (slow) QAtomicInt class when on old Qt ++class AtomicInt ++{ ++public: ++ inline AtomicInt( int _value = 0 ) : ++ m_value( _value ), ++ m_lock() ++ { ++ } ++ ++ inline int fetchAndStoreOrdered( int _newVal ) ++ { ++ m_lock.lock(); ++ const int oldVal = m_value; ++ m_value = _newVal; ++ m_lock.unlock(); ++ ++ return oldVal; ++ } ++ ++ inline int fetchAndAddOrdered( int _add ) ++ { ++ m_lock.lock(); ++ const int oldVal = m_value; ++ m_value += _add; ++ m_lock.unlock(); ++ ++ return oldVal; ++ } ++ ++ inline AtomicInt & operator=( const AtomicInt & _copy ) ++ { ++ m_lock.lock(); ++ m_value = _copy.m_value; ++ m_lock.unlock(); ++ ++ return *this; ++ } ++ ++ ++ inline AtomicInt & operator=( int _value ) ++ { ++ m_lock.lock(); ++ m_value = _value; ++ m_lock.unlock(); ++ ++ return *this; ++ } ++ ++ inline operator int() const ++ { ++ return m_value; ++ } ++ ++private: ++ volatile int m_value; ++ QMutex m_lock; ++} ; ++ ++#endif ++ ++#endif ++ +diff --git a/include/audio_port.h b/include/audio_port.h +index 6ee2932..e5e437e 100644 +--- a/include/audio_port.h ++++ b/include/audio_port.h +@@ -1,7 +1,7 @@ + /* + * audio_port.h - base-class for objects providing sound at a port + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -136,7 +136,7 @@ private: + + + friend class mixer; +- friend class mixerWorkerThread; ++ friend class MixerWorkerThread; + + } ; + +diff --git a/include/mixer.h b/include/mixer.h +index 12354a0..ae401f0 100644 +--- a/include/mixer.h ++++ b/include/mixer.h +@@ -1,7 +1,7 @@ + /* + * mixer.h - audio-device-independent mixer for LMMS + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -40,9 +40,9 @@ + + + #include +-#include + #include + #include ++#include + + + #include "lmms_basics.h" +@@ -73,7 +73,7 @@ const Octaves BaseOctave = DefaultOctave; + #include "play_handle.h" + + +-class mixerWorkerThread; ++class MixerWorkerThread; + + + class EXPORT mixer : public QObject +@@ -438,10 +438,9 @@ private: + bool m_newBuffer[SURROUND_CHANNELS]; + + int m_cpuLoad; +- QVector m_workers; ++ QVector m_workers; + int m_numWorkers; +- QSemaphore m_queueReadySem; +- QSemaphore m_workersDoneSem; ++ QWaitCondition m_queueReadyWaitCond; + + + playHandleVector m_playHandles; +@@ -469,7 +468,7 @@ private: + + + friend class engine; +- friend class mixerWorkerThread; ++ friend class MixerWorkerThread; + + } ; + +diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp +index ffca006..de8c1dc 100644 +--- a/src/core/mixer.cpp ++++ b/src/core/mixer.cpp +@@ -1,7 +1,7 @@ + /* + * mixer.cpp - audio-device-independent mixer for LMMS + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -41,6 +41,7 @@ + #include "sample_play_handle.h" + #include "piano_roll.h" + #include "micro_timer.h" ++#include "atomic_int.h" + + #include "audio_device.h" + #include "midi_client.h" +@@ -95,7 +96,7 @@ static void * aligned_malloc( int _bytes ) + + + +-class mixerWorkerThread : public QThread ++class MixerWorkerThread : public QThread + { + public: + enum JobTypes +@@ -107,50 +108,47 @@ public: + NumJobTypes + } ; + +- struct jobQueueItem ++ struct JobQueueItem + { +- jobQueueItem() : ++ JobQueueItem() : + type( InvalidJob ), + job( NULL ), ++ param( 0 ), + done( false ) + { + } +- jobQueueItem( JobTypes _type, void * _job ) : ++ JobQueueItem( JobTypes _type, void * _job, int _param = 0 ) : + type( _type ), + job( _job ), ++ param( _param ), + done( false ) + { + } + + JobTypes type; ++ void * job; ++ int param; + +- union +- { +- playHandle * playHandleJob; +- audioPort * audioPortJob; +- int effectChannelJob; +- volatile void * job; +- }; +- +-#if QT_VERSION >= 0x040400 +- QAtomicInt done; +-#else +- volatile bool done; +-#endif ++ AtomicInt done; + } ; + +- typedef QVector jobQueueItems; +- struct jobQueue ++ ++ struct JobQueue + { +- jobQueueItems items; +-#if QT_VERSION < 0x040400 +- QMutex lock; +-#endif ++#define JOB_QUEUE_SIZE 1024 ++ JobQueue() : ++ queueSize( 0 ) ++ { ++ } ++ ++ JobQueueItem items[JOB_QUEUE_SIZE]; ++ int queueSize; ++ AtomicInt itemsDone; + } ; + +- static jobQueue s_jobQueue; ++ static JobQueue s_jobQueue; + +- mixerWorkerThread( int _worker_num, mixer * _mixer ) : ++ MixerWorkerThread( int _worker_num, mixer * _mixer ) : + QThread( _mixer ), + m_workingBuf( (sampleFrame *) aligned_malloc( + _mixer->framesPerPeriod() * +@@ -158,12 +156,11 @@ public: + m_workerNum( _worker_num ), + m_quit( false ), + m_mixer( _mixer ), +- m_queueReadySem( &m_mixer->m_queueReadySem ), +- m_workersDoneSem( &m_mixer->m_workersDoneSem ) ++ m_queueReadyWaitCond( &m_mixer->m_queueReadyWaitCond ) + { + } + +- virtual ~mixerWorkerThread() ++ virtual ~MixerWorkerThread() + { + aligned_free( m_workingBuf ); + } +@@ -173,60 +170,7 @@ public: + m_quit = true; + } + +- void processJobQueue( void ) +- { +- jobQueueItems::iterator end_it = s_jobQueue.items.end(); +- for( jobQueueItems::iterator it = +- s_jobQueue.items.begin(); +- it != end_it; ++it ) +- { +-#if QT_VERSION >= 0x040400 +- if( it->done.fetchAndStoreOrdered( 1 ) == 0 ) +- { +-#else +- s_jobQueue.lock.lock(); +- if( !it->done ) +- { +- it->done = true; +- s_jobQueue.lock.unlock(); +-#endif +- switch( it->type ) +- { +- case PlayHandle: +- it->playHandleJob->play( m_workingBuf ); +- break; +- case AudioPortEffects: +- { +- audioPort * a = it->audioPortJob; +- const bool me = a->processEffects(); +- if( me || a->m_bufferUsage != audioPort::NoUsage ) +- { +- engine::getFxMixer()->mixToChannel( a->firstBuffer(), +- a->nextFxChannel() ); +- a->nextPeriod(); +- } +- } +- break; +- case EffectChannel: +- engine::getFxMixer()->processChannel( +- (fx_ch_t) it->effectChannelJob ); +- break; +- default: +-/*fprintf( stderr, "invalid job item type %d at %ld in jobqueue(%ld:%ld)\n", +- (int) it->type, (long int) it, +- (long int) s_jobQueue.items.begin(), +- (long int) end_it );*/ +- break; +- } +- } +-#if QT_VERSION < 0x040400 +- else +- { +- s_jobQueue.lock.unlock(); +- } +-#endif +- } +- } ++ void processJobQueue( void ); + + + private: +@@ -242,12 +186,13 @@ private: + #endif + #endif + #endif +- ++ QMutex m; + while( m_quit == false ) + { +- m_queueReadySem->acquire(); ++ m.lock(); ++ m_queueReadyWaitCond->wait( &m ); + processJobQueue(); +- m_workersDoneSem->release(); ++ m.unlock(); + } + } + +@@ -255,34 +200,103 @@ private: + int m_workerNum; + volatile bool m_quit; + mixer * m_mixer; +- QSemaphore * m_queueReadySem; +- QSemaphore * m_workersDoneSem; ++ QWaitCondition * m_queueReadyWaitCond; + + } ; + + +-mixerWorkerThread::jobQueue mixerWorkerThread::s_jobQueue; ++MixerWorkerThread::JobQueue MixerWorkerThread::s_jobQueue; + + +-#define FILL_JOB_QUEUE(_vec_type,_vec,_job_type,_condition) \ +- mixerWorkerThread::s_jobQueue.items.clear(); \ ++ ++void MixerWorkerThread::processJobQueue( void ) ++{ ++ for( int i = 0; i < s_jobQueue.queueSize; ++i ) ++ { ++ JobQueueItem * it = &s_jobQueue.items[i]; ++ if( it->done.fetchAndStoreOrdered( 1 ) == 0 ) ++ { ++ switch( it->type ) ++ { ++ case PlayHandle: ++ ( (playHandle *) it->job )-> ++ play( m_workingBuf ); ++ break; ++ case AudioPortEffects: ++ { ++ audioPort * a = (audioPort *) it->job; ++ const bool me = a->processEffects(); ++ if( me || a->m_bufferUsage != audioPort::NoUsage ) ++ { ++ engine::getFxMixer()->mixToChannel( a->firstBuffer(), ++ a->nextFxChannel() ); ++ a->nextPeriod(); ++ } ++ } ++ break; ++ case EffectChannel: ++ engine::getFxMixer()->processChannel( (fx_ch_t) it->param ); ++ break; ++ default: ++ break; ++ } ++ s_jobQueue.itemsDone.fetchAndAddOrdered( 1 ); ++ } ++ } ++} ++ ++#define FILL_JOB_QUEUE_BEGIN(_vec_type,_vec,_condition) \ ++ MixerWorkerThread::s_jobQueue.queueSize = 0; \ ++ MixerWorkerThread::s_jobQueue.itemsDone = 0; \ + for( _vec_type::iterator it = _vec.begin(); \ +- it != _vec.end(); ++it ) \ ++ it != _vec.end(); ++it ) \ + { \ + if( _condition ) \ +- { \ +- mixerWorkerThread::s_jobQueue.items. \ +- push_back( \ +- mixerWorkerThread::jobQueueItem( _job_type, \ +- (void *)*it ) );\ ++ { ++ ++#define FILL_JOB_QUEUE_END() \ ++ ++MixerWorkerThread::s_jobQueue.queueSize; \ + } \ + } + ++#define FILL_JOB_QUEUE(_vec_type,_vec,_job_type,_condition) \ ++ FILL_JOB_QUEUE_BEGIN(_vec_type,_vec,_condition) \ ++ MixerWorkerThread::s_jobQueue.items \ ++ [MixerWorkerThread::s_jobQueue.queueSize] = \ ++ MixerWorkerThread::JobQueueItem( _job_type, \ ++ (void *) *it ); \ ++ FILL_JOB_QUEUE_END() ++ ++#define FILL_JOB_QUEUE_PARAM(_vec_type,_vec,_job_type,_condition) \ ++ FILL_JOB_QUEUE_BEGIN(_vec_type,_vec,_condition) \ ++ MixerWorkerThread::s_jobQueue.items \ ++ [MixerWorkerThread::s_jobQueue.queueSize] = \ ++ MixerWorkerThread::JobQueueItem( _job_type, \ ++ NULL, *it ); \ ++ FILL_JOB_QUEUE_END() ++ + #define START_JOBS() \ +- m_queueReadySem.release( m_numWorkers ); \ ++ m_queueReadyWaitCond.wakeAll(); ++ ++// define a pause instruction for spinlock-loop - merely useful on ++// HyperThreading systems with just one physical core (e.g. Intel Atom) ++#ifdef LMMS_HOST_X86_64 ++#define SPINLOCK_PAUSE() asm( "pause" ) ++#else ++#ifdef LMMS_HOST_X86_64 ++#define SPINLOCK_PAUSE() asm( "pause" ) ++#else ++#define SPINLOCK_PAUSE() ++#endif ++#endif + + #define WAIT_FOR_JOBS() \ +- m_workersDoneSem.acquire( m_numWorkers ); ++ m_workers[m_numWorkers]->processJobQueue(); \ ++ while( MixerWorkerThread::s_jobQueue.itemsDone < \ ++ MixerWorkerThread::s_jobQueue.queueSize ) \ ++ { \ ++ SPINLOCK_PAUSE(); \ ++ } \ + + + +@@ -296,10 +310,8 @@ mixer::mixer( void ) : + m_writeBuf( NULL ), + m_cpuLoad( 0 ), + m_workers(), +- m_numWorkers( QThread::idealThreadCount() > 1 ? +- QThread::idealThreadCount()-1 : 0 ), +- m_queueReadySem( m_numWorkers ), +- m_workersDoneSem( m_numWorkers ), ++ m_numWorkers( QThread::idealThreadCount()-1 ), ++ m_queueReadyWaitCond(), + m_qualitySettings( qualitySettings::Mode_Draft ), + m_masterGain( 1.0f ), + m_audioDev( NULL ), +@@ -363,14 +375,12 @@ mixer::mixer( void ) : + m_bufferPool.push_back( m_readBuf ); + } + +- m_queueReadySem.acquire( m_numWorkers ); +- m_workersDoneSem.acquire( m_numWorkers ); + for( int i = 0; i < m_numWorkers+1; ++i ) + { +- mixerWorkerThread * wt = new mixerWorkerThread( i, this ); +- if( i > 0 ) ++ MixerWorkerThread * wt = new MixerWorkerThread( i, this ); ++ if( i < m_numWorkers ) + { +- wt->start( QThread::HighestPriority ); ++ wt->start( QThread::TimeCriticalPriority ); + } + m_workers.push_back( wt ); + } +@@ -387,15 +397,15 @@ mixer::~mixer() + { + // distribute an empty job-queue so that worker-threads + // get out of their processing-loop +- mixerWorkerThread::s_jobQueue.items.clear(); ++ MixerWorkerThread::s_jobQueue.queueSize = 0; + for( int w = 0; w < m_numWorkers; ++w ) + { +- m_workers[w+1]->quit(); ++ m_workers[w]->quit(); + } + START_JOBS(); + for( int w = 0; w < m_numWorkers; ++w ) + { +- m_workers[w+1]->wait( 500 ); ++ m_workers[w]->wait( 500 ); + } + + while( m_fifo->available() ) +@@ -432,7 +442,7 @@ void mixer::startProcessing( bool _needs_fifo ) + if( _needs_fifo ) + { + m_fifoWriter = new fifoWriter( this, m_fifo ); +- m_fifoWriter->start( QThread::TimeCriticalPriority ); ++ m_fifoWriter->start( QThread::HighPriority ); + } + else + { +@@ -609,10 +619,9 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) + + // STAGE 1: run and render all play handles + FILL_JOB_QUEUE(playHandleVector,m_playHandles, +- mixerWorkerThread::PlayHandle, ++ MixerWorkerThread::PlayHandle, + !( *it )->done()); + START_JOBS(); +- m_workers[0]->processJobQueue(); + WAIT_FOR_JOBS(); + + // removed all play handles which are done +@@ -620,7 +629,7 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) + it != m_playHandles.end(); ) + { + if( ( *it )->affinityMatters() && +- ( *it )->affinity() != QThread::currentThread() ) ++ ( *it )->affinity() != QThread::currentThread() ) + { + ++it; + continue; +@@ -639,17 +648,15 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) + + // STAGE 2: process effects of all instrument- and sampletracks + FILL_JOB_QUEUE(QVector,m_audioPorts, +- mixerWorkerThread::AudioPortEffects,1); ++ MixerWorkerThread::AudioPortEffects,1); + START_JOBS(); +- m_workers[0]->processJobQueue(); + WAIT_FOR_JOBS(); + + + // STAGE 3: process effects in FX mixer +- FILL_JOB_QUEUE(QVector,__fx_channel_jobs, +- mixerWorkerThread::EffectChannel,1); ++ FILL_JOB_QUEUE_PARAM(QVector,__fx_channel_jobs, ++ MixerWorkerThread::EffectChannel,1); + START_JOBS(); +- m_workers[0]->processJobQueue(); + WAIT_FOR_JOBS(); + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0047-PeakControllerEffect-corrected-calculation-for-RMS.patch +++ lmms-0.4.2/debian/patches/0047-PeakControllerEffect-corrected-calculation-for-RMS.patch @@ -0,0 +1,57 @@ +From 345277d34fd64f0bef5295bcbe93e5242d680bff Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Mar 2009 00:44:40 +0100 +Subject: [PATCH] PeakControllerEffect: corrected calculation for RMS and moved loops out + of if-branches - results however should be nearly the same but more accurate + and not negative + (cherry picked from commit 3084b361eabbd727f6134bc24640ac1a07cca530) + +--- + .../peak_controller_effect.cpp | 23 +++++++------------- + 1 files changed, 8 insertions(+), 15 deletions(-) + +diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp +index e8d9f8e..d3312f0 100644 +--- a/plugins/peak_controller_effect/peak_controller_effect.cpp ++++ b/plugins/peak_controller_effect/peak_controller_effect.cpp +@@ -99,29 +99,22 @@ bool peakControllerEffect::processAudioBuffer( sampleFrame * _buf, + + + // RMS: +- float sum = 0; +- if( c.m_muteModel.value() ) ++ double sum = 0; ++ for( int i = 0; i < _frames; ++i ) + { +- for( int i = 0; i < _frames; ++i ) +- { +- // is this really RMS??? +- sum += (_buf[i][0]+_buf[i][0]) * (_buf[i][1]+_buf[i][1]); +- } +- // eases vectorization +- for( int i = 0; i < _frames; ++i ) +- { +- _buf[i][0] = _buf[i][1] = 0.0f; +- } ++ sum += _buf[i][0]*_buf[i][0] + _buf[i][1]*_buf[i][1]; + } +- else ++ ++ if( c.m_muteModel.value() ) + { + for( int i = 0; i < _frames; ++i ) + { +- sum += (_buf[i][0]+_buf[i][0]) * (_buf[i][1]+_buf[i][1]); ++ _buf[i][0] = _buf[i][1] = 0.0f; + } + } + +- m_lastSample = c.m_baseModel.value() + c.m_amountModel.value() * sqrtf( 0.5f * sum / _frames ); ++ m_lastSample = c.m_baseModel.value() + c.m_amountModel.value() * ++ sqrtf( sum / _frames ); + + //checkGate( out_sum / _frames ); + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0058-AutomationPatternView-fixed-painting-of-automation.patch +++ lmms-0.4.2/debian/patches/0058-AutomationPatternView-fixed-painting-of-automation.patch @@ -0,0 +1,35 @@ +From 7931d65a899215db869eb2885ad1e4cdc4926f1a Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Mon, 16 Mar 2009 17:37:25 +0100 +Subject: [PATCH] AutomationPatternView: fixed painting of automation data + +At low pixels/tact ratio automation was not drawn properly due to miscalculation +of x2 variable. This patch fixes this by adding 1 to x2. +(cherry picked from commit 9ea3c6660d22571d93fb26620f766c663102d8b3) +--- + src/gui/automation_pattern_view.cpp | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/gui/automation_pattern_view.cpp b/src/gui/automation_pattern_view.cpp +index fc765b4..1ae7742 100644 +--- a/src/gui/automation_pattern_view.cpp ++++ b/src/gui/automation_pattern_view.cpp +@@ -246,12 +246,13 @@ void automationPatternView::paintEvent( QPaintEvent * ) + m_pat->getTimeMap().begin(); + it != m_pat->getTimeMap().end(); ++it ) + { +- const float x1 = 2 * x_base + it.key() * ppt / ++ const float x1 = x_base + it.key() * ppt / + midiTime::ticksPerTact(); + float x2; + if( it+1 != m_pat->getTimeMap().end() ) + { +- x2 = (it+1).key() * ppt / midiTime::ticksPerTact() + 2; ++ x2 = x_base + (it+1).key() * ppt / ++ midiTime::ticksPerTact() + 1; + } + else + { +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0048-MidiPort-properly-emit-portChanged-signals-when-loa.patch +++ lmms-0.4.2/debian/patches/0048-MidiPort-properly-emit-portChanged-signals-when-loa.patch @@ -0,0 +1,52 @@ +From 76252b461b4bf2ab43780accf256f387b426db56 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Mar 2009 01:00:36 +0100 +Subject: [PATCH] MidiPort: properly emit portChanged signals when loading settings - fixes + MidiPortMenu showing devices not checked although actually connected + (cherry picked from commit 782156cf706527b88d0aafbb294cbaebec1d7fe3) + +--- + src/core/midi/midi_port.cpp | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/core/midi/midi_port.cpp b/src/core/midi/midi_port.cpp +index 44896e7..d8035f7 100644 +--- a/src/core/midi/midi_port.cpp ++++ b/src/core/midi/midi_port.cpp +@@ -2,7 +2,7 @@ + * midi_port.cpp - abstraction of MIDI-ports which are part of LMMS's MIDI- + * sequencing system + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -52,7 +52,7 @@ midiPort::midiPort( const QString & _name, midiClient * _mc, + m_fixedInputVelocityModel( -1, -1, MidiMaxVelocity, this, + tr( "Fixed input velocity" ) ), + m_fixedOutputVelocityModel( -1, -1, MidiMaxVelocity, this, +- tr( "Fixed output velocity" ) ), ++ tr( "Fixed output velocity" ) ), + m_outputProgramModel( 1, 1, MidiProgramCount, this, + tr( "Output MIDI program" ) ), + m_readableModel( false, this, tr( "Receive MIDI-events" ) ), +@@ -255,6 +255,7 @@ void midiPort::loadSettings( const QDomElement & _this ) + subscribeReadablePort( it.key() ); + } + } ++ emit readablePortsChanged(); + } + + if( outputEnabled() ) +@@ -268,6 +269,7 @@ void midiPort::loadSettings( const QDomElement & _this ) + subscribeReadablePort( it.key() ); + } + } ++ emit writeablePortsChanged(); + } + } + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0022-fix-lockup-when-freezing-patterns.patch +++ lmms-0.4.2/debian/patches/0022-fix-lockup-when-freezing-patterns.patch @@ -0,0 +1,95 @@ +From c5d01d5e0db5bde90b653c60396528df7bb46e76 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 23:36:32 +0000 +Subject: [PATCH] stable backport: + * added missing slot declaration for abortFreeze(), fixes lockup when freezing pattern (closes #2530320) + * update patternView after freezing + * fixed drawing of frozen pattern + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2042 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 7 +++++++ + include/pattern.h | 5 ++--- + src/tracks/pattern.cpp | 6 ++++-- + 3 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 50a1656..072fd6c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,12 @@ + 2009-02-13 Tobias Doerffel + ++ * include/pattern.h: ++ * src/tracks/pattern.cpp: ++ - added missing slot declaration for abortFreeze(), fixes lockup when ++ freezing pattern (closes #2530320) ++ - update patternView after freezing ++ - fixed drawing of frozen pattern ++ + * include/sample_buffer.h: + * src/core/sample_buffer.cpp: + - when resampling whole sampleBuffer, set end_of_input = 1 in +diff --git a/include/pattern.h b/include/pattern.h +index d256e90..a5edb0f 100644 +--- a/include/pattern.h ++++ b/include/pattern.h +@@ -2,7 +2,7 @@ + * pattern.h - declaration of class pattern, which contains all informations + * about a pattern + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -139,13 +139,12 @@ protected: + void ensureBeatNotes( void ); + void updateBBTrack( void ); + +- void abortFreeze( void ); +- + + protected slots: + void clear( void ); + void freeze( void ); + void unfreeze( void ); ++ void abortFreeze( void ); + void changeTimeSignature( void ); + + +diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp +index 15a005e..8bba198 100644 +--- a/src/tracks/pattern.cpp ++++ b/src/tracks/pattern.cpp +@@ -3,7 +3,7 @@ + /* + * pattern.cpp - implementation of class pattern which holds notes + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2005-2007 Danny McRae + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net +@@ -731,6 +731,7 @@ patternFreezeThread::patternFreezeThread( pattern * _pattern ) : + + patternFreezeThread::~patternFreezeThread() + { ++ m_pattern->dataChanged(); + } + + +@@ -1310,8 +1311,9 @@ void patternView::paintEvent( QPaintEvent * ) + } + else if( m_pat->m_frozenPattern != NULL ) + { ++ p.setBrush( QBrush() ); + p.setPen( QColor( 0, 224, 255 ) ); +- p.drawRect( 0, 0, width(), height() - 1 ); ++ p.drawRect( 0, 0, width()-1, height() - 1 ); + p.drawPixmap( 3, height() - s_frozen->height() - 4, *s_frozen ); + } + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0012-do-not-load-samples-bigger-than-100-MB-closes-2458.patch +++ lmms-0.4.2/debian/patches/0012-do-not-load-samples-bigger-than-100-MB-closes-2458.patch @@ -0,0 +1,234 @@ +From a4ba61882854135a292661933c46d1163b667daf Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Feb 2009 22:18:07 +0000 +Subject: [PATCH] do not load samples bigger than 100 MB (closes #2458375) (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2019 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 5 ++++ + src/core/sample_buffer.cpp | 52 +++++++++++++++++++++++++------------------ + 2 files changed, 35 insertions(+), 22 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a2f7538..4c019bf 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++2009-02-12 Tobias Doerffel ++ ++ * src/core/sample_buffer.cpp: ++ do not load samples bigger than 100 MB (closes #2458375) ++ + 2009-02-05 Tobias Doerffel + + * plugins/ladspa_effect/caps/dsp/Eq.h: +diff --git a/src/core/sample_buffer.cpp b/src/core/sample_buffer.cpp +index 8fe7325..7b474c6 100644 +--- a/src/core/sample_buffer.cpp ++++ b/src/core/sample_buffer.cpp +@@ -3,7 +3,7 @@ + /* + * sample_buffer.cpp - container-class sampleBuffer + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -67,7 +67,7 @@ + + sampleBuffer::sampleBuffer( const QString & _audio_file, + bool _is_base64_data ) : +- m_audioFile( ( _is_base64_data == TRUE ) ? "" : _audio_file ), ++ m_audioFile( ( _is_base64_data == true ) ? "" : _audio_file ), + m_origData( NULL ), + m_origFrames( 0 ), + m_data( NULL ), +@@ -77,11 +77,11 @@ sampleBuffer::sampleBuffer( const QString & _audio_file, + m_loopStartFrame( 0 ), + m_loopEndFrame( 0 ), + m_amplification( 1.0f ), +- m_reversed( FALSE ), ++ m_reversed( false ), + m_frequency( BaseFreq ), + m_sampleRate( engine::getMixer()->baseSampleRate() ) + { +- if( _is_base64_data == TRUE ) ++ if( _is_base64_data == true ) + { + loadFromBase64( _audio_file ); + } +@@ -102,7 +102,7 @@ sampleBuffer::sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) : + m_loopStartFrame( 0 ), + m_loopEndFrame( 0 ), + m_amplification( 1.0f ), +- m_reversed( FALSE ), ++ m_reversed( false ), + m_frequency( BaseFreq ), + m_sampleRate( engine::getMixer()->baseSampleRate() ) + { +@@ -129,7 +129,7 @@ sampleBuffer::sampleBuffer( const f_cnt_t _frames ) : + m_loopStartFrame( 0 ), + m_loopEndFrame( 0 ), + m_amplification( 1.0f ), +- m_reversed( FALSE ), ++ m_reversed( false ), + m_frequency( BaseFreq ), + m_sampleRate( engine::getMixer()->baseSampleRate() ) + { +@@ -171,7 +171,7 @@ void sampleBuffer::update( bool _keep_settings ) + // by following code... + m_data = new sampleFrame[m_origFrames]; + memcpy( m_data, m_origData, m_origFrames * BYTES_PER_FRAME ); +- if( _keep_settings == FALSE ) ++ if( _keep_settings == false ) + { + m_frames = m_origFrames; + m_loopStartFrame = m_startFrame = 0; +@@ -185,9 +185,16 @@ void sampleBuffer::update( bool _keep_settings ) + int_sample_t * buf = NULL; + ch_cnt_t channels = DEFAULT_CHANNELS; + sample_rate_t samplerate = engine::getMixer()->baseSampleRate(); +- + m_frames = 0; + ++ if( QFileInfo( file ).size() > 100*1024*1024 ) ++ { ++ qWarning( "refusing to load sample files bigger " ++ "than 100 MB" ); ++ } ++ else ++ { ++ + if( m_frames == 0 ) + { + m_frames = decodeSampleSF( f, buf, channels, +@@ -207,6 +214,7 @@ void sampleBuffer::update( bool _keep_settings ) + } + + delete[] f; ++ } + + if( m_frames > 0 && buf != NULL ) + { +@@ -295,7 +303,7 @@ void sampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr, + delete resampled; + } + +- if( _keep_settings == FALSE ) ++ if( _keep_settings == false ) + { + // update frame-variables + m_loopStartFrame = m_startFrame = 0; +@@ -414,7 +422,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f, + f_cnt_t frames = 0; + + QFile * f = new QFile( _f ); +- if( f->open( QFile::ReadOnly ) == FALSE ) ++ if( f->open( QFile::ReadOnly ) == false ) + { + delete f; + return( 0 ); +@@ -509,7 +517,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + + if( m_endFrame == 0 || _frames == 0 ) + { +- return( FALSE ); ++ return( false ); + } + + const double freq_factor = (double) _freq / (double) m_frequency * +@@ -521,7 +529,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + freq_factor ); + if( total_frames_for_current_pitch == 0 ) + { +- return( FALSE ); ++ return( false ); + } + + // this holds the number of the first frame to play +@@ -544,14 +552,14 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + { + if( play_frame >= m_endFrame ) + { +- return( FALSE ); ++ return( false ); + } + frames_for_loop = static_cast( + ( m_endFrame - play_frame ) / + freq_factor ); + if( frames_for_loop == 0 ) + { +- return( FALSE ); ++ return( false ); + } + } + +@@ -613,7 +621,7 @@ bool sampleBuffer::play( sampleFrame * _ab, handleState * _state, + + _state->m_frameIndex = play_frame; + +- return( TRUE ); ++ return( true ); + + } + +@@ -727,7 +735,7 @@ QString sampleBuffer::openAudioFile( void ) const + if( QFileInfo( f ).isRelative() ) + { + f = configManager::inst()->userSamplesDir() + f; +- if( QFileInfo( f ).exists() == FALSE ) ++ if( QFileInfo( f ).exists() == false ) + { + f = configManager::inst()->factorySamplesDir() + + m_audioFile; +@@ -826,8 +834,8 @@ QString & sampleBuffer::toBase64( QString & _dst ) const + FLAC__StreamEncoder * flac_enc = FLAC__stream_encoder_new(); + FLAC__stream_encoder_set_channels( flac_enc, DEFAULT_CHANNELS ); + FLAC__stream_encoder_set_blocksize( flac_enc, FRAMES_PER_BUF ); +-/* FLAC__stream_encoder_set_do_exhaustive_model_search( flac_enc, TRUE ); +- FLAC__stream_encoder_set_do_mid_side_stereo( flac_enc, TRUE );*/ ++/* FLAC__stream_encoder_set_do_exhaustive_model_search( flac_enc, true ); ++ FLAC__stream_encoder_set_do_mid_side_stereo( flac_enc, true );*/ + FLAC__stream_encoder_set_sample_rate( flac_enc, + engine::getMixer()->sampleRate() ); + QBuffer ba_writer; +@@ -1112,7 +1120,7 @@ void sampleBuffer::setEndFrame( const f_cnt_t _e ) + void sampleBuffer::setAmplification( float _a ) + { + m_amplification = _a; +- update( TRUE ); ++ update( true ); + } + + +@@ -1121,7 +1129,7 @@ void sampleBuffer::setAmplification( float _a ) + void sampleBuffer::setReversed( bool _on ) + { + m_reversed = _on; +- update( TRUE ); ++ update( true ); + } + + +@@ -1129,7 +1137,7 @@ void sampleBuffer::setReversed( bool _on ) + + QString sampleBuffer::tryToMakeRelative( const QString & _file ) + { +- if( QFileInfo( _file ).isRelative() == FALSE ) ++ if( QFileInfo( _file ).isRelative() == false ) + { + QString f = QString( _file ).replace( QDir::separator(), '/' ); + QString fsd = configManager::inst()->factorySamplesDir(); +@@ -1181,7 +1189,7 @@ sampleBuffer::handleState::handleState( bool _varying_pitch ) : + { + int error; + if( ( m_resamplingData = src_new(/* +- ( engine::getMixer()->highQuality() == TRUE ) ? ++ ( engine::getMixer()->highQuality() == true ) ? + SRC_SINC_FASTEST :*/ + SRC_LINEAR, + DEFAULT_CHANNELS, &error ) ) == NULL ) +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0044-MidiImport-per-default-use-bank-0-instead-of-128.patch +++ lmms-0.4.2/debian/patches/0044-MidiImport-per-default-use-bank-0-instead-of-128.patch @@ -0,0 +1,26 @@ +From 95b0607745dc0718c3f380b4219833e413716811 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Wed, 4 Mar 2009 18:41:39 +0100 +Subject: [PATCH] MidiImport: per default use bank 0 instead of 128 + +Backported from 402a2d32f7d9da9889f123a007fc16147a8329e1 (master) +--- + plugins/midi_import/midi_import.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/plugins/midi_import/midi_import.cpp b/plugins/midi_import/midi_import.cpp +index 11a9e60..e5ad69c 100644 +--- a/plugins/midi_import/midi_import.cpp ++++ b/plugins/midi_import/midi_import.cpp +@@ -214,7 +214,7 @@ public: + { + isSF2 = true; + it_inst->loadFile( configManager::inst()->defaultSoundfont() ); +- it_inst->getChildModel( "bank" )->setValue( 128 ); ++ it_inst->getChildModel( "bank" )->setValue( 0 ); + it_inst->getChildModel( "patch" )->setValue( 0 ); + } + else +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0064-RemoteVstPlugin-use-SplittedThreading-model-for-MDA.patch +++ lmms-0.4.2/debian/patches/0064-RemoteVstPlugin-use-SplittedThreading-model-for-MDA.patch @@ -0,0 +1,46 @@ +From 4569b635d9f105948a33c824724e8b1409aeed90 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sun, 22 Mar 2009 14:50:57 +0100 +Subject: [PATCH] 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 96fb6f5a3883da119681fc7bcba67016333f7a48) +--- + plugins/vst_base/remote_vst_plugin.cpp | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/plugins/vst_base/remote_vst_plugin.cpp b/plugins/vst_base/remote_vst_plugin.cpp +index 2a0b997..99cebfc 100644 +--- a/plugins/vst_base/remote_vst_plugin.cpp ++++ b/plugins/vst_base/remote_vst_plugin.cpp +@@ -566,8 +566,6 @@ bool remoteVstPlugin::load( const std::string & _plugin_file ) + case CCONST( 'z', '3', 't', 'a' ): // z3ta+ + case CCONST( 'T', 'C', '_', 'S' ): // Cygnus + case CCONST( 'S', 'y', 't', 'r' ): // Sytrus +- debugMessage( "switching to splitted threading " +- "model\n" ); + __threadingModel = SplittedThreading; + break; + +@@ -575,6 +573,16 @@ bool remoteVstPlugin::load( const std::string & _plugin_file ) + break; + } + ++ // most of MDA plugins only work with SplittedThreading model ++ if( strncmp( id, "mda", 3 ) == 0 ) ++ { ++ __threadingModel = SplittedThreading; ++ } ++ ++ if( __threadingModel == SplittedThreading ) ++ { ++ debugMessage( "switching to splitted threading model\n" ); ++ } + + m_plugin->dispatcher( m_plugin, effOpen, 0, 0, 0, 0 ); + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0046-TrackContainerView-when-dragging-a-preset-file-into.patch +++ lmms-0.4.2/debian/patches/0046-TrackContainerView-when-dragging-a-preset-file-into.patch @@ -0,0 +1,29 @@ +From 0f40a68e75b5bc06c4e045954822210409d43bb9 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Mon, 9 Mar 2009 22:43:33 +0100 +Subject: [PATCH] TrackContainerView: when dragging a preset file into TrackContainerView + load complete track settings rather than just track specific settings - + fixes an issue where the track name was not loaded from the dragged preset + (cherry picked from commit 5976ab5ce219207015ec97aeb7565f56c196d7d8) + +--- + src/gui/track_container_view.cpp | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/src/gui/track_container_view.cpp b/src/gui/track_container_view.cpp +index 6db6a79..364985d 100644 +--- a/src/gui/track_container_view.cpp ++++ b/src/gui/track_container_view.cpp +@@ -405,8 +405,7 @@ void trackContainerView::dropEvent( QDropEvent * _de ) + instrumentTrack * it = dynamic_cast( + track::create( track::InstrumentTrack, + m_tc ) ); +- it->loadTrackSpecificSettings( mmp.content().firstChild(). +- toElement() ); ++ it->loadSettings( mmp.content().toElement() ); + //it->toggledInstrumentTrackButton( true ); + _de->accept(); + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0050-AutomationPattern-save-and-restore-length-of-Automa.patch +++ lmms-0.4.2/debian/patches/0050-AutomationPattern-save-and-restore-length-of-Automa.patch @@ -0,0 +1,50 @@ +From ab35c1255200164d1fd85e3136429d74071ba022 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Mar 2009 19:03:42 +0100 +Subject: [PATCH] AutomationPattern: save and restore length of AutomationPattern to avoid + confusions with the previous auto-resize behaviour + (cherry picked from commit 03bf853a4da103f14d9e8af2d7a0255cbe0e8ba3) + +--- + src/core/automation_pattern.cpp | 11 ++++++++--- + 1 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/core/automation_pattern.cpp b/src/core/automation_pattern.cpp +index fe473eb..78139f1 100644 +--- a/src/core/automation_pattern.cpp ++++ b/src/core/automation_pattern.cpp +@@ -2,7 +2,7 @@ + * automation_pattern.cpp - implementation of class automationPattern which + * holds dynamic values + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * Copyright (c) 2006-2008 Javier Serrano Polo + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net +@@ -273,6 +273,7 @@ float automationPattern::valueAt( const midiTime & _time ) const + void automationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this ) + { + _this.setAttribute( "pos", startPosition() ); ++ _this.setAttribute( "len", trackContentObject::length() ); + _this.setAttribute( "name", name() ); + + for( timeMap::const_iterator it = m_timeMap.begin(); +@@ -337,8 +338,12 @@ void automationPattern::loadSettings( const QDomElement & _this ) + } + } + } +- +- changeLength( length() ); ++ int len = _this.attribute( "len" ).toInt(); ++ if( len <= 0 ) ++ { ++ len = length(); ++ } ++ changeLength( len ); + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0042-NotePlayHandle-call-instrumentTrack-deleteNotePlug.patch +++ lmms-0.4.2/debian/patches/0042-NotePlayHandle-call-instrumentTrack-deleteNotePlug.patch @@ -0,0 +1,39 @@ +From 12ba546419c07d4832079a2134518ac06924feee Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 27 Feb 2009 14:12:33 +0100 +Subject: [PATCH] NotePlayHandle: call instrumentTrack::deleteNotePluginData() before + invalidating itself in instrumentTrack's m_notes array - fixes + recording with instruments that under certain circumstances call + notePlayHandle::noteOff() on their own (e.g. Kicker) + +Backported from 6e4cc7b270fd9c389681870a16afa8fe8a2aaf3d (master) +--- + src/core/note_play_handle.cpp | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp +index b29ce78..2738dcf 100644 +--- a/src/core/note_play_handle.cpp ++++ b/src/core/note_play_handle.cpp +@@ -126,14 +126,14 @@ notePlayHandle::~notePlayHandle() + m_instrumentTrack->m_processHandles.removeAll( this ); + } + +- if( m_instrumentTrack->m_notes[key()] == this ) ++ if( m_pluginData != NULL ) + { +- m_instrumentTrack->m_notes[key()] = NULL; ++ m_instrumentTrack->deleteNotePluginData( this ); + } + +- if( m_pluginData != NULL ) ++ if( m_instrumentTrack->m_notes[key()] == this ) + { +- m_instrumentTrack->deleteNotePluginData( this ); ++ m_instrumentTrack->m_notes[key()] = NULL; + } + + for( notePlayHandleVector::iterator it = m_subNotes.begin(); +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0017-fix-distorted-widgets-everywhere-with-qt45.patch +++ lmms-0.4.2/debian/patches/0017-fix-distorted-widgets-everywhere-with-qt45.patch @@ -0,0 +1,206 @@ +From 4db2ef1f7dc75c991073363675c0b0694507dedb Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 11:33:04 +0000 +Subject: [PATCH] reverted some of the changes from 2008-11-10 which caused distorted graphics when running LMMS with Qt 4.5 (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2031 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + src/core/track.cpp | 4 +--- + src/gui/widgets/combobox.cpp | 3 +-- + src/gui/widgets/controller_view.cpp | 11 +++++------ + src/gui/widgets/effect_rack_view.cpp | 3 +-- + src/gui/widgets/envelope_and_lfo_view.cpp | 4 +--- + src/gui/widgets/group_box.cpp | 3 +-- + src/gui/widgets/lcd_spinbox.cpp | 3 +-- + src/gui/widgets/tab_widget.cpp | 4 +--- + 8 files changed, 12 insertions(+), 23 deletions(-) + +diff --git a/src/core/track.cpp b/src/core/track.cpp +index 913e8e8..a4c0ff5 100644 +--- a/src/core/track.cpp ++++ b/src/core/track.cpp +@@ -4,7 +4,7 @@ + * track.cpp - implementation of classes concerning tracks -> neccessary for + * all track-like objects (beat/bassline, sample-track...) + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -1384,8 +1384,6 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : + m_trackView->getTrackContainerView(), + SLOT( deleteTrackView( trackView * ) ), + Qt::QueuedConnection ); +- +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + } + + +diff --git a/src/gui/widgets/combobox.cpp b/src/gui/widgets/combobox.cpp +index 3110acb..c53d1e2 100644 +--- a/src/gui/widgets/combobox.cpp ++++ b/src/gui/widgets/combobox.cpp +@@ -3,7 +3,7 @@ + /* + * combobox.cpp - implementation of LMMS-combobox + * +- * Copyright (c) 2006-2008 Tobias Doerffel ++ * Copyright (c) 2006-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -80,7 +80,6 @@ comboBox::comboBox( QWidget * _parent, const QString & _name ) : + connect( &m_menu, SIGNAL( triggered( QAction * ) ), + this, SLOT( setItem( QAction * ) ) ); + +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + setAccessibleName( _name ); + doConnections(); + } +diff --git a/src/gui/widgets/controller_view.cpp b/src/gui/widgets/controller_view.cpp +index 86a8062..71e9753 100644 +--- a/src/gui/widgets/controller_view.cpp ++++ b/src/gui/widgets/controller_view.cpp +@@ -57,8 +57,7 @@ controllerView::controllerView( controller * _model, QWidget * _parent ) : + + setAttribute( Qt::WA_OpaquePaintEvent, TRUE ); + +- QPushButton * ctls_btn = new QPushButton( tr( "Controls" ), +- this ); ++ QPushButton * ctls_btn = new QPushButton( tr( "Controls" ), this ); + + QFont f = ctls_btn->font(); + ctls_btn->setFont( pointSize<7>( f ) ); +@@ -79,8 +78,8 @@ controllerView::controllerView( controller * _model, QWidget * _parent ) : + + m_subWindow->setWindowIcon( m_controllerDlg->windowIcon() ); + +- connect( m_controllerDlg, SIGNAL( closed() ), +- this, SLOT( closeControls() ) ); ++ connect( m_controllerDlg, SIGNAL( closed() ), ++ this, SLOT( closeControls() ) ); + + m_subWindow->hide(); + +@@ -149,8 +148,8 @@ void controllerView::paintEvent( QPaintEvent * ) + p.setPen( Qt::white ); + p.drawText( 6, 12, c->displayName() ); + +- f.setBold( FALSE ); +- p.setFont( f ); ++ f.setBold( FALSE ); ++ p.setFont( f ); + p.drawText( 8, 26, c->name() ); + } + +diff --git a/src/gui/widgets/effect_rack_view.cpp b/src/gui/widgets/effect_rack_view.cpp +index 0fb2ae5..1a0df38 100644 +--- a/src/gui/widgets/effect_rack_view.cpp ++++ b/src/gui/widgets/effect_rack_view.cpp +@@ -4,7 +4,7 @@ + * effect_rack_view.cpp - view for effectChain-model + * + * Copyright (c) 2006-2007 Danny McRae +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -42,7 +42,6 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) : + QWidget( _parent ), + modelView( NULL, this ) + { +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + setFixedSize( 250, 250 ); + + m_mainLayout = new QVBoxLayout( this ); +diff --git a/src/gui/widgets/envelope_and_lfo_view.cpp b/src/gui/widgets/envelope_and_lfo_view.cpp +index 21d3647..afdd890 100644 +--- a/src/gui/widgets/envelope_and_lfo_view.cpp ++++ b/src/gui/widgets/envelope_and_lfo_view.cpp +@@ -4,7 +4,7 @@ + * envelope_and_lfo_view.cpp - widget which is m_used by envelope/lfo/filter- + * tab of channel-window + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -103,8 +103,6 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) : + s_lfoGraph = new QPixmap( embed::getIconPixmap( "lfo_graph" ) ); + } + +- setAttribute( Qt::WA_OpaquePaintEvent, true ); +- + m_predelayKnob = new knob( knobBright_26, this ); + m_predelayKnob->setLabel( tr( "DEL" ) ); + m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y ); +diff --git a/src/gui/widgets/group_box.cpp b/src/gui/widgets/group_box.cpp +index e14767f..64df7b0 100644 +--- a/src/gui/widgets/group_box.cpp ++++ b/src/gui/widgets/group_box.cpp +@@ -3,7 +3,7 @@ + /* + * group_box.cpp - groupbox for LMMS + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -47,7 +47,6 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) : + boolModelView( NULL, this ), + m_caption( _caption ) + { +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + updatePixmap(); + + m_led = new pixmapButton( this, _caption ); +diff --git a/src/gui/widgets/lcd_spinbox.cpp b/src/gui/widgets/lcd_spinbox.cpp +index 312096d..254e5ac 100644 +--- a/src/gui/widgets/lcd_spinbox.cpp ++++ b/src/gui/widgets/lcd_spinbox.cpp +@@ -3,7 +3,7 @@ + /* + * lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * Copyright (c) 2008 Paul Giblock + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net +@@ -52,7 +52,6 @@ lcdSpinBox::lcdSpinBox( int _num_digits, QWidget * _parent, + m_numDigits( _num_digits ), + m_origMousePos() + { +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + setEnabled( true ); + + setAccessibleName( _name ); +diff --git a/src/gui/widgets/tab_widget.cpp b/src/gui/widgets/tab_widget.cpp +index 518015d..bd6f637 100644 +--- a/src/gui/widgets/tab_widget.cpp ++++ b/src/gui/widgets/tab_widget.cpp +@@ -3,7 +3,7 @@ + /* + * tab_widget.cpp - tabwidget for LMMS + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -50,8 +50,6 @@ tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) : + QPalette pal = palette(); + pal.setColor( QPalette::Background, bg_color ); + setPalette( pal ); +- +- setAttribute( Qt::WA_OpaquePaintEvent, true ); + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0001-in-FL_EffectChannel-initialize-isMuted-member-fixe.patch +++ lmms-0.4.2/debian/patches/0001-in-FL_EffectChannel-initialize-isMuted-member-fixe.patch @@ -0,0 +1,42 @@ +From e1403ee10bd9872043009dbbdafab568b9ffe4a8 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Mon, 22 Dec 2008 16:44:36 +0000 +Subject: [PATCH] in FL_EffectChannel initialize isMuted member - fixes muted FX channels when importing older FLP files (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1965 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 6 ++++++ + plugins/flp_import/flp_import.cpp | 3 ++- + 2 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 43bbcf5..abc4dc5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,9 @@ ++2008-12-22 Tobias Doerffel ++ ++ * plugins/flp_import/flp_import.cpp: ++ in FL_EffectChannel initialize isMuted member - fixes muted FX channels ++ when importing older FLP files ++ + 2008-12-19 Tobias Doerffel + + * CMakeLists.txt: +diff --git a/plugins/flp_import/flp_import.cpp b/plugins/flp_import/flp_import.cpp +index 3c31bda..15f5f30 100644 +--- a/plugins/flp_import/flp_import.cpp ++++ b/plugins/flp_import/flp_import.cpp +@@ -509,7 +509,8 @@ struct FL_EffectChannel + { + FL_EffectChannel() : + name(), +- volume( DefaultVolume ) ++ volume( DefaultVolume ), ++ isMuted( false ) + { + } + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0014-update-patch-after-loading-settings-closes-2486372.patch +++ lmms-0.4.2/debian/patches/0014-update-patch-after-loading-settings-closes-2486372.patch @@ -0,0 +1,39 @@ +From fa6e5be63607cac92e081403590e75368eb31851 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Feb 2009 23:25:49 +0000 +Subject: [PATCH] update patch after loading settings (closes #2486372) (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2024 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 3 +++ + plugins/sf2_player/sf2_player.cpp | 1 + + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 8c213e0..a006680 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,8 @@ + 2009-02-12 Tobias Doerffel + ++ * plugins/sf2_player/sf2_player.cpp: ++ update patch after loading settings (closes #2486372) ++ + * src/gui/piano_roll.cpp: + ensure, cursor is never NULL when painting it in paintEvent() + +diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp +index 1589d24..eeb4540 100644 +--- a/plugins/sf2_player/sf2_player.cpp ++++ b/plugins/sf2_player/sf2_player.cpp +@@ -236,6 +236,7 @@ void sf2Instrument::loadSettings( const QDomElement & _this ) + m_chorusSpeed.loadSettings( _this, "chorusSpeed" ); + m_chorusDepth.loadSettings( _this, "chorusDepth" ); + ++ updatePatch(); + updateGain(); + } + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0018-disable-output-monitor-per-default-and-show-click-hi.patch +++ lmms-0.4.2/debian/patches/0018-disable-output-monitor-per-default-and-show-click-hi.patch @@ -0,0 +1,88 @@ +From bc2bf0e30be59c9a6e5f6fbe6d24c2e5993572f3 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Fri, 13 Feb 2009 14:54:54 +0000 +Subject: [PATCH] disable output monitor per default and show click-hint (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2034 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + src/gui/widgets/visualization_widget.cpp | 26 +++++++++++++------------- + 1 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/src/gui/widgets/visualization_widget.cpp b/src/gui/widgets/visualization_widget.cpp +index 59fe565..645192b 100644 +--- a/src/gui/widgets/visualization_widget.cpp ++++ b/src/gui/widgets/visualization_widget.cpp +@@ -3,7 +3,7 @@ + /* + * visualization_widget.cpp - widget for visualization of sound-data + * +- * Copyright (c) 2005-2008 Tobias Doerffel ++ * Copyright (c) 2005-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -29,6 +29,7 @@ + #include + + #include "visualization_widget.h" ++#include "gui_templates.h" + #include "main_window.h" + #include "embed.h" + #include "engine.h" +@@ -42,7 +43,7 @@ visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p, + QWidget( _p ), + s_background( _bg ), + m_points( new QPointF[engine::getMixer()->framesPerPeriod()] ), +- m_active( FALSE ) ++ m_active( false ) + { + setFixedSize( s_background.width(), s_background.height() ); + setAttribute( Qt::WA_OpaquePaintEvent, true ); +@@ -55,9 +56,6 @@ visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p, + + toolTip::add( this, tr( "click to enable/disable visualization of " + "master-output" ) ); +- +- setActive( TRUE ); +- + } + + +@@ -79,11 +77,7 @@ void visualizationWidget::updateAudioBuffer( void ) + const surroundSampleFrame * c = engine::getMixer()-> + currentReadBuffer(); + const fpp_t fpp = engine::getMixer()->framesPerPeriod(); +- for( f_cnt_t f = 0; f < fpp; ++f ) +- { +- m_buffer[f][0] = c[f][0]; +- m_buffer[f][1] = c[f][1]; +- } ++ memcpy( m_buffer, c, sizeof( surroundSampleFrame ) * fpp ); + engine::getMixer()->unlock(); + } + } +@@ -169,12 +163,18 @@ void visualizationWidget::paintEvent( QPaintEvent * ) + { + m_points[frame] = QPointF( + x_base + (float) frame * xd, +- y_base + ( mixer::clip( m_buffer[frame][ch] ) * +- half_h ) ); ++ y_base + ( mixer::clip( ++ m_buffer[frame][ch] ) * ++ half_h ) ); + } + p.drawPolyline( m_points, frames ); + } +- ++ } ++ else ++ { ++ p.setPen( QColor( 192, 192, 192 ) ); ++ p.setFont( pointSize<7>( p.font() ) ); ++ p.drawText( 6, height()-5, tr( "Click to enable" ) ); + } + } + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0052-FX-Fader-added-accessibleName-property-for-FX-fader.patch +++ lmms-0.4.2/debian/patches/0052-FX-Fader-added-accessibleName-property-for-FX-fader.patch @@ -0,0 +1,100 @@ +From 4dbb6a20bdd003e28172e44d7533b8073f43fcea Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sat, 14 Mar 2009 16:10:13 +0100 +Subject: [PATCH] FX-Fader: added accessibleName property for FX faders for not displaying + an empty titlebar in context-menu + (cherry picked from commit c24b923b787f49c931a88dd89b510731764b0b43) + +Conflicts: + + src/gui/fx_mixer_view.cpp +--- + include/fader.h | 4 ++-- + src/gui/fx_mixer_view.cpp | 4 +++- + src/gui/widgets/fader.cpp | 5 +++-- + 3 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/include/fader.h b/include/fader.h +index f6a6aef..257fc35 100644 +--- a/include/fader.h ++++ b/include/fader.h +@@ -1,7 +1,7 @@ + /* + * fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -58,7 +58,7 @@ class fader : public QWidget, public floatModelView + { + Q_OBJECT + public: +- fader( floatModel * _model, QWidget * _parent ); ++ fader( floatModel * _model, const QString & _name, QWidget * _parent ); + virtual ~fader(); + + void setMaxPeak( float _max ); +diff --git a/src/gui/fx_mixer_view.cpp b/src/gui/fx_mixer_view.cpp +index 3488c55..0276693 100644 +--- a/src/gui/fx_mixer_view.cpp ++++ b/src/gui/fx_mixer_view.cpp +@@ -1,7 +1,7 @@ + /* + * fx_mixer_view.cpp - effect-mixer-view for LMMS + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -97,6 +97,7 @@ public: + } + } + ++ + private: + fxMixerView * m_mv; + QString & m_name; +@@ -173,6 +174,7 @@ fxMixerView::fxMixerView() : + + + cv->m_fader = new fader( &m->m_fxChannels[i]->m_volumeModel, ++ tr( "FX Fader %1" ).arg( i ), + cv->m_fxLine ); + cv->m_fader->move( 15-cv->m_fader->width()/2, + cv->m_fxLine->height()- +diff --git a/src/gui/widgets/fader.cpp b/src/gui/widgets/fader.cpp +index ce52835..02a1de2 100644 +--- a/src/gui/widgets/fader.cpp ++++ b/src/gui/widgets/fader.cpp +@@ -1,7 +1,7 @@ + /* + * fader.cpp - fader-widget used in mixer - partly taken from Hydrogen + * +- * Copyright (c) 2008 Tobias Doerffel ++ * Copyright (c) 2008-2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -57,7 +57,7 @@ + + + +-fader::fader( floatModel * _model, QWidget * _parent ) : ++fader::fader( floatModel * _model, const QString & _name, QWidget * _parent ) : + QWidget( _parent ), + floatModelView( _model, this ), + m_model( _model ), +@@ -69,6 +69,7 @@ fader::fader( floatModel * _model, QWidget * _parent ) : + m_leds( embed::getIconPixmap( "fader_leds" ) ), + m_knob( embed::getIconPixmap( "fader_knob" ) ) + { ++ setAccessibleName( _name ); + setAttribute( Qt::WA_OpaquePaintEvent, true ); + setMinimumSize( 23, 116 ); + setMaximumSize( 23, 116); +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0013-ensure-cursor-is-never-NULL-when-painting-it-in-pai.patch +++ lmms-0.4.2/debian/patches/0013-ensure-cursor-is-never-NULL-when-painting-it-in-pai.patch @@ -0,0 +1,56 @@ +From 84f3ecf76ba2ec26d2b2fc0a601abcefc50bb8f2 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 12 Feb 2009 22:53:07 +0000 +Subject: [PATCH] ensure, cursor is never NULL when painting it in paintEvent() + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2021 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 3 +++ + src/gui/piano_roll.cpp | 8 +++++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 4c019bf..8c213e0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,8 @@ + 2009-02-12 Tobias Doerffel + ++ * src/gui/piano_roll.cpp: ++ ensure, cursor is never NULL when painting it in paintEvent() ++ + * src/core/sample_buffer.cpp: + do not load samples bigger than 100 MB (closes #2458375) + +diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp +index c86ad65..212b83d 100644 +--- a/src/gui/piano_roll.cpp ++++ b/src/gui/piano_roll.cpp +@@ -2,7 +2,7 @@ + * piano_roll.cpp - implementation of piano-roll which is used for actual + * writing of melodies + * +- * Copyright (c) 2004-2008 Tobias Doerffel ++ * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2008 Andrew Kelley + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net +@@ -2864,11 +2864,13 @@ void pianoRoll::paintEvent( QPaintEvent * _pe ) + break; + case ModeErase: cursor = s_toolErase; break; + case ModeSelect: cursor = s_toolSelect; break; +- //case ModeMove: cursor = s_toolMove; break; + case ModeOpen: cursor = s_toolOpen; break; + } +- p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ), ++ if( cursor != NULL ) ++ { ++ p.drawPixmap( mapFromGlobal( QCursor::pos() ) + QPoint( 8, 8 ), + *cursor ); ++ } + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0065-Oscillator-reverted-recent-fix-for-PM.patch +++ lmms-0.4.2/debian/patches/0065-Oscillator-reverted-recent-fix-for-PM.patch @@ -0,0 +1,35 @@ +From 1046c7afb8be5676e8c6771793c7ed5621205ff4 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sun, 22 Mar 2009 15:15:47 +0100 +Subject: [PATCH] Oscillator: reverted recent fix for PM + +As of acaaea82046df9c9f7cc3dab792f809b7cd4753e a samplerate dependent +ratio has been added into calculation of the local phase. This however is +wrong for PM. +(cherry picked from commit 2547bf8d571cf699554b05febcc51efdc3d217d5) +--- + src/core/oscillator.cpp | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/src/core/oscillator.cpp b/src/core/oscillator.cpp +index 7bbdeca..91d84a5 100644 +--- a/src/core/oscillator.cpp ++++ b/src/core/oscillator.cpp +@@ -375,13 +375,11 @@ void oscillator::updatePM( sampleFrame * _ab, const fpp_t _frames, + m_subOsc->update( _ab, _frames, _chnl ); + recalcPhase(); + const float osc_coeff = m_freq * m_detuning; +- const float sampleRateCorrection = 44100.0f / +- engine::getMixer()->processingSampleRate(); + + for( fpp_t frame = 0; frame < _frames; ++frame ) + { + _ab[frame][_chnl] = getSample( m_phase + +- _ab[frame][_chnl]*sampleRateCorrection ) ++ _ab[frame][_chnl] ) + * m_volume; + m_phase += osc_coeff; + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0009-better-workaround-for-optimizer-bug-in-GCC-4.3-s.patch +++ lmms-0.4.2/debian/patches/0009-better-workaround-for-optimizer-bug-in-GCC-4.3-s.patch @@ -0,0 +1,62 @@ +From d3e6f5a348289c2ea81069ec3ac748a3c858260e Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 5 Feb 2009 13:19:18 +0000 +Subject: [PATCH] better workaround for optimizer bug in GCC >= 4.3 (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2006 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 17 +++++++++++++++++ + plugins/ladspa_effect/caps/dsp/Eq.h | 9 ++------- + 2 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 82d4502..628d286 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,22 @@ + 2009-02-05 Tobias Doerffel + ++ * plugins/ladspa_effect/caps/dsp/Eq.h: ++ better workaround for optimizer bug in GCC >= 4.3 ++ ++ * plugins/sid/sid_instrument.cpp: ++ * plugins/flp_import/unrtf.cpp: ++ * src/core/track.cpp: ++ added missing header for compilation with GCC 4.4 ++ ++ * include/pattern.h: ++ * src/tracks/pattern.cpp: ++ cleanups ++ ++ * src/core/envelope_and_lfo_parameters.cpp: ++ - simplified formulas for calculating envelope array resulting in about ++ 3x performance with traditional FPU code ++ - loops now can be vectorized by GCC 4.4 ++ + * include/atomic_int.h: + * include/audio_port.h: + * include/mixer.h: +diff --git a/plugins/ladspa_effect/caps/dsp/Eq.h b/plugins/ladspa_effect/caps/dsp/Eq.h +index 4b6fb76..92639e8 100644 +--- a/plugins/ladspa_effect/caps/dsp/Eq.h ++++ b/plugins/ladspa_effect/caps/dsp/Eq.h +@@ -84,14 +84,9 @@ class Eq + { + for (int z = 0; z < 2; ++z) + { +- // work-around for buggy optimizer in GCC 4.3 +- for (int i = 0; i < Bands-1; ++i) +- y[z][i] = 0; +- y[z][Bands-1] = 0; ++ memset( y[z], 0, Bands*sizeof( eq_sample ) ); ++ x[z] = 0; + } +- +- for (int i = 0; i < 2; ++i) +- x[i] = 0; + } + + void init (double fs, double Q) +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0040-PeakController-always-check-for-m_peakEffect-NUL.patch +++ lmms-0.4.2/debian/patches/0040-PeakController-always-check-for-m_peakEffect-NUL.patch @@ -0,0 +1,46 @@ +From a2c09608101efeecaad187ddc67d76de4168a896 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 26 Feb 2009 16:25:03 +0100 +Subject: [PATCH] PeakController: always check for m_peakEffect != NULL before using it as + sometimes it keeps NULL due to bugs in PeakController and + PeakControllerEffect deletion (closes #2616486) + +--- + src/core/peak_controller.cpp | 12 +++++++++--- + 1 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/core/peak_controller.cpp b/src/core/peak_controller.cpp +index 161d17c..11eaa6e 100644 +--- a/src/core/peak_controller.cpp ++++ b/src/core/peak_controller.cpp +@@ -48,8 +48,11 @@ peakController::peakController( model * _parent, + controller( PeakController, _parent, tr( "Peak Controller" ) ), + m_peakEffect( _peak_effect ) + { +- connect( m_peakEffect, SIGNAL( destroyed( ) ), ++ if( m_peakEffect ) ++ { ++ connect( m_peakEffect, SIGNAL( destroyed( ) ), + this, SLOT( handleDestroyedEffect( ) ) ); ++ } + } + + +@@ -87,9 +90,12 @@ void peakController::handleDestroyedEffect( ) + + void peakController::saveSettings( QDomDocument & _doc, QDomElement & _this ) + { +- controller::saveSettings( _doc, _this ); ++ if( m_peakEffect ) ++ { ++ controller::saveSettings( _doc, _this ); + +- _this.setAttribute( "effectId", m_peakEffect->m_effectId ); ++ _this.setAttribute( "effectId", m_peakEffect->m_effectId ); ++ } + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0005-fixed-bug-you-can-use-shift-left-to-move-notes-past.patch +++ lmms-0.4.2/debian/patches/0005-fixed-bug-you-can-use-shift-left-to-move-notes-past.patch @@ -0,0 +1,67 @@ +From aa575bca83f97abb62686e62c2249d8dc8811265 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Thu, 5 Feb 2009 09:06:58 +0000 +Subject: [PATCH] fixed bug: you can use shift+left to move notes past the beginning (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1997 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + ChangeLog | 7 ++++++- + src/gui/piano_roll.cpp | 14 +++++++++++++- + 2 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index e42f356..82d4502 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,4 +1,4 @@ +-2009-02-04 Tobias Doerffel ++2009-02-05 Tobias Doerffel + + * include/atomic_int.h: + * include/audio_port.h: +@@ -7,6 +7,11 @@ + reworked mixer-threads (synchronization, realization of jobqueue etc.) + which results in a much better performance and stability + ++2009-02-04 Andrew Kelley ++ ++ * src/gui/piano_roll.cpp: ++ fixed bug: you can use shift+left to move notes past the beginning ++ + 2009-01-25 Paul Giblock + + * src/tracks/bb_track.cpp: +diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp +index 314c2cf..c86ad65 100644 +--- a/src/gui/piano_roll.cpp ++++ b/src/gui/piano_roll.cpp +@@ -806,13 +806,25 @@ void pianoRoll::shiftPos( int amount ) //shift notes pos by amount + { + bool useAllNotes = ! isSelection(); + const noteVector & notes = m_pattern->notes(); ++ ++ bool first = true; + for( noteVector::const_iterator it = notes.begin(); it != notes.end(); + ++it ) + { + // if none are selected, move all notes, otherwise + // only move selected notes +- if( useAllNotes || ( *it )->selected() ) ++ if( ( *it )->selected() || (useAllNotes && ( *it )->length() > 0) ) + { ++ // don't let notes go to out of bounds ++ if( first ) ++ { ++ m_moveBoundaryLeft = ( *it )->pos(); ++ if( m_moveBoundaryLeft + amount < 0 ) ++ { ++ amount += 0 - (amount + m_moveBoundaryLeft); ++ } ++ first = false; ++ } + ( *it )->setPos( ( *it )->pos() + amount ); + } + } +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0061-LadspaEffect-fixed-controller-connections-on-sample.patch +++ lmms-0.4.2/debian/patches/0061-LadspaEffect-fixed-controller-connections-on-sample.patch @@ -0,0 +1,47 @@ +From 8ec501d6c6d5d16822270f65cc2c7326ab981199 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Wed, 18 Mar 2009 23:35:02 +0100 +Subject: [PATCH] LadspaEffect: fixed controller connections on samplerate changes + +When global samplerate changes, settings of a LADSPA effect are stored in +a temporary object, the effect is reloaded and the settings are restored. +However, controller connections weren't restored properly as the connections +were not finalized. This commit fixes the issue. +(cherry picked from commit ee9e5680b7cf4880cd46db3113e4c6d5a9b86c5c) +--- + plugins/ladspa_effect/ladspa_effect.cpp | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/plugins/ladspa_effect/ladspa_effect.cpp b/plugins/ladspa_effect/ladspa_effect.cpp +index 79b3b66..12d4db4 100644 +--- a/plugins/ladspa_effect/ladspa_effect.cpp ++++ b/plugins/ladspa_effect/ladspa_effect.cpp +@@ -2,6 +2,7 @@ + * ladspa_effect.cpp - class for processing LADSPA effects + * + * Copyright (c) 2006-2008 Danny McRae ++ * Copyright (c) 2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * +@@ -35,6 +36,7 @@ + #include "mixer.h" + #include "effect_chain.h" + #include "automation_pattern.h" ++#include "controller_connection.h" + + + #undef SINGLE_SOURCE_COMPILE +@@ -123,6 +125,9 @@ void ladspaEffect::changeSampleRate( void ) + // the IDs of re-created controls have been saved and now need to be + // resolved again + automationPattern::resolveAllIDs(); ++ ++ // make sure, connections are ok ++ controllerConnection::finalizeConnections(); + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0066-VstEffect-set-displayName-property-at-initializatio.patch +++ lmms-0.4.2/debian/patches/0066-VstEffect-set-displayName-property-at-initializatio.patch @@ -0,0 +1,27 @@ +From 0cb99b2d67e22026304b3ab7149221d7d4540db7 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sun, 22 Mar 2009 15:32:06 +0100 +Subject: [PATCH] VstEffect: set displayName property at initialization + +In VstEffect constructor set the displayName property in order to make +EffectView display actual plugin name rather than just "VST Effect". +(cherry picked from commit dce6ae9a7d5fe11ceb85eed510a696193594ea9f) +--- + plugins/vst_effect/vst_effect.cpp | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/plugins/vst_effect/vst_effect.cpp b/plugins/vst_effect/vst_effect.cpp +index 8903b20..94cfe74 100644 +--- a/plugins/vst_effect/vst_effect.cpp ++++ b/plugins/vst_effect/vst_effect.cpp +@@ -69,6 +69,7 @@ vstEffect::vstEffect( model * _parent, + { + openPlugin( m_key.attributes["file"] ); + } ++ setDisplayName( m_key.name ); + } + + +-- +1.6.0.4 + --- lmms-0.4.2.orig/debian/patches/0023-reverted-rev-2037-as-we-have-custom-changes-in-this.patch +++ lmms-0.4.2/debian/patches/0023-reverted-rev-2037-as-we-have-custom-changes-in-this.patch @@ -0,0 +1,61 @@ +From 1102f03fde456d395bf3266e2bfc65a9d0283026 Mon Sep 17 00:00:00 2001 +From: Tobias Doerffel +Date: Sat, 14 Feb 2009 17:35:24 +0000 +Subject: [PATCH] reverted rev 2037 as we have custom changes in this file (stable backport) + +git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2044 0778d3d1-df1d-0410-868b-ea421aaaa00d +--- + src/3rdparty/samplerate/samplerate.h | 10 ++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/src/3rdparty/samplerate/samplerate.h b/src/3rdparty/samplerate/samplerate.h +index 9651e63..160b8bd 100644 +--- a/src/3rdparty/samplerate/samplerate.h ++++ b/src/3rdparty/samplerate/samplerate.h +@@ -30,6 +30,8 @@ + #ifndef SAMPLERATE_H + #define SAMPLERATE_H + ++#include "export.h" ++ + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ +@@ -73,7 +75,7 @@ typedef long (*src_callback_t) (void *cb_data, float **data) ; + ** Error returned in *error. + */ + +-SRC_STATE* src_new (int converter_type, int channels, int *error) ; ++SRC_STATE* EXPORT src_new (int converter_type, int channels, int *error) ; + + /* + ** Initilisation for callback based API : return an anonymous pointer to the +@@ -91,14 +93,14 @@ SRC_STATE* src_callback_new (src_callback_t func, int converter_type, int channe + ** Always returns NULL. + */ + +-SRC_STATE* src_delete (SRC_STATE *state) ; ++SRC_STATE* EXPORT src_delete (SRC_STATE *state) ; + + /* + ** Standard processing function. + ** Returns non zero on error. + */ + +-int src_process (SRC_STATE *state, SRC_DATA *data) ; ++int EXPORT src_process (SRC_STATE *state, SRC_DATA *data) ; + + /* + ** Callback based processing function. Read up to frames worth of data from +@@ -161,7 +163,7 @@ int src_error (SRC_STATE *state) ; + /* + ** Convert the error number into a string. + */ +-const char* src_strerror (int error) ; ++const char* EXPORT src_strerror (int error) ; + + /* + ** The following enums can be used to set the interpolator type +-- +1.6.0.4 +