Commit Graph

42 Commits

Author SHA1 Message Date
Levin Oehlmann
5904b249c0 clang-tidy: Apply modernize-use-override everywhere (#6439)
... to mark overriding functions `override` instead of `virtual`.
2022-06-19 23:03:55 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* Update ringbuffer submodule to fix includes

* Remove cyclic includes

* Remove Qt include prefixes

* Include C++ versions of C headers

E.g.: assert.h -> cassert

* Move CLIP_BORDER_WIDTH into ClipView

This allows to remove includes to TrackView.h in ClipView cpp files.

* Elliminate useless includes

This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):

```
include-what-you-use;
    -Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
    -Xiwyu;--keep=*/xmmintrin.h;
    -Xiwyu;--keep=*/lmmsconfig.h;
    -Xiwyu;--keep=*/weak_libjack.h;
    -Xiwyu;--keep=*/sys/*;
    -Xiwyu;--keep=*/debug.h;
    -Xiwyu;--keep=*/SDL/*;
    -Xiwyu;--keep=*/alsa/*;
    -Xiwyu;--keep=*/FL/x.h;
    -Xiwyu;--keep=*/MidiApple.h;
    -Xiwyu;--keep=*/MidiWinMM.h;
    -Xiwyu;--keep=*/AudioSoundIo.h
```

* Fixup: Remove empty #if-#ifdef pairs

* Remove LMMS_HAVE_STD(LIB|INT)_H
2022-03-02 13:30:43 +01:00
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
Martin Pavelek
6f8c6dba82 Alias-free oscillators (#5826)
Add a band-limited, alias-free wavetable oscillator option to the
`Oscillator` class. Use it by default for Triple Oscillator.

Savefiles which do not have this feature enabled (e.g. old
savefiles) will be loaded without this feature to keep the sound
consistent.

Original author: @curlymorphic.
Fixed: @he29-net.
2021-07-04 13:14:59 +02:00
Spekular
bf7c87de7e Fix rule of three for SampleBuffer, SampleTCO (#5727)
* Automatic formatting changes

* Add copy constructor and assignemnt to SampleBuffer

* Add copy constructor to SampleTCO

* Delete SampleTCO copy assignment, initial work on SampleBuffer swap method

* SampleBuffer: Finish(?) swap and use it for copy assignment, lock for read in copy constructor

* Don't forget to unlock in copy assignment!

* Formatting changes

* Lock ordering in swap

* Fix leak and constness

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>

* Fix multiplication style, ensure lock is held when necessary

... by switching from an initializer list to manual assignments.

* Fixes from review

* Avoid more undefined behavior

* Update src/tracks/SampleTrack.cpp

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2020-12-29 23:01:41 +01:00
IanCaio
cd2366a21c Fix style on "SampleBuffer.cpp" and "SampleBuffer.h" (#5791)
Fix code style issues in the `SampleBuffer` class.

Remove strange comments around "not an Ogg Vorbis file"
warning.
2020-12-07 23:09:34 +01:00
Kumar
53b003bc8f Allow SampleTCOs/Sample Clips to be reversed (#5765)
Enable the reverse option from `SampleBuffer.cpp`, and partially change the style and make more readable `SampleBuffer.cpp`.
2020-11-21 09:56:06 +05:30
Spekular
17565caf53 Improved relative paths (#5117)
* Create PathUtils

* Replace old SampleBuffer calls

* Fix automatic track names

* Fix things

* Remove accidental duplicate file

* Add includes

* More incldues

* PhysSong's code review + style

* Fix vestige loading?

Seems more reasonable to convert from relative on load and to relative on save than vice versa.

* Typo fix

* More Bases

* Enable more bases

* Add missing semicolons in prefixes

* Nicer sample track tooltip

* Use correct directories

"userXDir" gives the default dir for ladspa, sf2, and gig. "xDir" gives the user dir.

* Make relative to both default and custom locations

Part 1

* Make relative to both default and custom locations

Part 2

* Typofix

* Typofix

* Fix upgrade function after base renaming

* Fix Tests

* Update tests/src/core/RelativePathsTest.cpp

Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>

* Choose UserXBase over DefaultXBase if identical

toShortestRelative sticks with the first base found if two bases give the same path length. By placing UserXBase Bases before DefaultXBase Bases in the relativeBases vector, toShortestRelative will prioritize them.

* Ensure baseLocation always has trailing slash

Otherwise, a user configuring a path without one will break things.

* Move loc declaration out of switch

* Semicolon

* Apply suggestions from code review...

* Include PathUtil and sort includes

* More granular includes

* Apply suggestions from code review

Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>

* Update include/PathUtil.h

* Leave empty paths alone

* Fix stupid merge

* Really fix merge. Hopefully

* Switch Base from enum to class enum

* Don't pass Base by reference

* Use QStringLiteral for static QString allocation in basePrefix method

* Make VST loading more similar to previous implementation

* Fix tests after enum change

* Attempt to fix VST loading, nicer name for sample clips

* Fix last review comment

Don't append a "/" that will be removed by cleanPath later

* Apply suggestions from code review

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2020-07-28 17:07:35 +02:00
Hyunjin Song
12ea80d4fb Merge branch 'stable-1.2'
# Conflicts:
#	data/locale/cs.ts
#	data/locale/en.ts
#	data/locale/ko.ts
#	data/locale/ru.ts
#	data/locale/uk.ts
#	data/locale/zh_TW.ts
#	include/Engine.h
#	plugins/nes/Nes.cpp
#	src/core/NotePlayHandle.cpp
#	src/core/SampleBuffer.cpp
#	src/tracks/SampleTrack.cpp
2019-06-12 17:41:12 +09:00
Shmuel H
37f0c3f33d SampleBuffer -> Use processingSampleRate.
SampleBuffer was using baseSampleRate as the default samplerate instead of the actual processingSampleRate.
2019-06-02 20:48:58 +03:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Lukas W
3c6f200beb Merge branch 'stable-1.2'
# Conflicts:
#	cmake/modules/BuildPlugin.cmake
#	plugins/CMakeLists.txt
#	plugins/LadspaEffect/swh/CMakeLists.txt
#	plugins/LadspaEffect/tap/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp
#	src/gui/MainWindow.cpp
2018-07-06 12:42:15 +02:00
Hyunin Song
ddcae478d4 Fix sample file loading on Windows 2018-07-05 20:16:01 +09:00
Lukas W
d42a685007 Refactoring: Remove duplicate code (#4310) 2018-04-25 18:49:39 +02:00
Lukas W
29f832034a Remove unused includes (#3429) 2017-03-16 11:35:18 +00:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Javier Serrano Polo
5606a04ad7 Defer updates to SampleBuffer
Removed global lock from the Mixer
2016-06-18 05:29:21 +02:00
Javier Serrano Polo
d31089ceb5 Fixed removal of track when notes are playing 2016-06-16 17:42:00 +02:00
Lukas W
ca8f80d44f Fix loading relative file path samples
Closes #2412
2016-02-11 11:58:42 +13:00
Colin Wallace
7eed8c63b4 fix atrocious formatting 2015-07-03 02:34:48 +00:00
Colin Wallace
d805302f06 Fix deadlock & use QWrite/ReadLockers instead of manually managing locks 2015-07-03 02:20:12 +00:00
Vesa
dc4bfdc60d Various fixes and precautions
Samplebuffer: reload all samples when samplerate changes. This is because of the way LMMS uses samples: we always resample all samples t$
LadspaEffect: some safeguards for the non-inplacebroken plugins which use the same buffer for input and output. Theoretically, if some p$
FxMixer: fix effect processing in multichannel-chains
2014-11-18 13:58:40 +02:00
Vesa
1deb80acc3 Finish audioport rehaul, get vol/pan knobs working again, also some bugfixes
We're now doing the vol/pan stuff in audioport, since this way we avoid the pointless repetition of doing it in the playhandles
2014-11-18 13:58:39 +02:00
Vesa
75770b4d2e Fix 64 bit, increase mm usage 2014-11-18 13:58:36 +02:00
Vesa
9c25be1bde LMMS Memory Manager 2014-11-18 13:58:36 +02:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Vesa
4dece979c6 Samplebuffer/AFP: coding style, remove redundant inlines 2014-04-23 19:15:59 +03:00
Vesa
fa67d0b436 AFP: Add interpolation selector, fix segfault-causing bug with reverse mode 2014-04-23 12:18:35 +03:00
Vesa
2599370d53 AFP: add updated artwork, fix the bug where opening the plugin w/o samplebuffer glitches the wavegraph
Samplebuffer: use qualitysettings for interpolation (currently defaults to SINC_FASTEST on playback), also: in visualize, draw both channels instead of averaging them into one graph (otherwise, samplebuffers with counter-phase content show up as flatline)
2014-04-10 00:25:25 +03:00
Tobias Doerffel
f21fbf1946 Merge pull request #569 from diizy/loops
AFP, Samplebuffer updates
2014-04-06 21:57:17 +02:00
Tobias Doerffel
bd691e6d68 Merge pull request #564 from diizy/master
Optimize linear interpolation function
2014-04-05 07:43:11 +02:00
Vesa
9bef55c7f5 Add usage of linearInterpolate() to several places (mostly my plugins for now but i'll add more if i find them) 2014-04-05 02:23:17 +03:00
Vesa
55f678b80d Samplebuffer changes - we can just directly read floats from libsndfile, seems to work (faster) this way 2014-04-05 00:56:21 +03:00
Vesa
afa1275af9 SampleBuffer: fix a segfault when moving a loop point while playing a note, also do some sptring cleanup (some unused/redundant variables removed)
Also, some codepath optimization: add a method to SampleBuffer for setting all loop/start/endpoints at once, so we don't have to wait for mutex unlocks 4 times in a row. Then make AFP utilize this method.
2014-04-04 02:48:04 +03:00
Vesa
0442be3729 Finish ping pong loop implementation in AFP 2014-04-04 00:40:03 +03:00
Vesa
0cfda7d1f4 Initial ping-pong loop implementation 2014-04-04 00:40:03 +03:00
Vesa
5c142cb2a4 AFP: add a separate loopback point, and knob to control it. 2014-03-28 21:27:05 +02:00
Vesa
37ad60a704 Set default directory to the waveform directory when opening an audio file for a user-defined waveform 2014-02-01 00:01:42 +02:00
Wong Cho Ching
c45aafc748 Make LFO controller accept custom waveforms 2014-01-24 22:55:32 +08:00
groboclown
b7b361414a Add "stutter" capability to the audio file processor. 2014-01-22 20:05:10 -06:00
Tobias Doerffel
9a7ad0264f SampleBuffer, SamplePlayHandle, SampleRecordHandle, SampleTrack: new coding style
Renamed file and class names.
2014-01-14 18:01:14 +01:00