Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master + fix include directives #11

Merged
merged 52 commits into from
Sep 29, 2019
Merged

Merge master + fix include directives #11

merged 52 commits into from
Sep 29, 2019

Conversation

uklotzde
Copy link

No description provided.

uklotzde and others added 30 commits August 16, 2019 22:57
For advanced controller mappings, it can be desireable to check the
current shift state of a component container by reading its `isShifted`
attribute. This attribute is defined as follows:

    isShifted: false,
    shift: function () {
        this.forEachComponent(function (component) {
            if (typeof component.shift === 'function') {
                //[...]
                component.shift();
            }
            // Set isShifted for child ComponentContainers forEachComponent is iterating through recursively
            this.isShifted = true;
        });
    },
    unshift: function () {
        this.forEachComponent(function (component) {
            if (typeof component.unshift === 'function') {
                // [...]
                component.unshift();
            }
            // Set isShifted for child ComponentContainers forEachComponent is iterating through recursively
            this.isShifted = false;
        });
    },

Unfortunately, the comment in the source code is wrong, because `isShifted` will
*not* be set recursively. In fact, it will only ever be set if the
`shift` method of a component container is called directly. When
interating thought components recursively, `forEachComponent` will only
call `shift` for the components inside a component container, but not
for the container itself:

    var applyOperationTo = function (obj) {
        if (obj instanceof Component) {
            operation.call(that, obj);
        } else if (recursive && obj instanceof ComponentContainer) {
            obj.forEachComponent(operation);
        } else if (Array.isArray(obj)) {
            obj.forEach(function (element) {
                applyOperationTo(element);
            });
        }
    };

Hence, `isShifted` will not be set recursively.
To fix that, this PR introduces an additional function
`forEachComponentContainer` that will be used by the
`shift()`/`unshift()` methods to propagate the shift state to child
containers recursively.
For LV2 plugins to be visible, they need to be in the LV2 search path.
This patch allows a list of lv2 plugins to be passed as well as a flag
to enable a default list of plugins. To enable the default list, you
can build with:

nix-build --arg  defaultLv2Plugins true
Extended track metadata [aoide Prerequisite]
Fix creation of temporary tracks in CueControlTest
…shift

Fix shift behaviour for ComponentContainers
uklotzde and others added 22 commits September 27, 2019 15:08
open cover art view on left click release
Properly wrap LV2 searchpath on nix builds
Beatloops snap to the closest (fractional) beat in quantized mode LP1752133
- at least the title must be empty
- splitting into artist/title only if both fields are empty
Follow-up: Use PainterScope everywhere
Synchronize external track collections [aoide Prerequisite]
Only highlight crates/playlists when a single track is selected
Improve parsing of artist/title from file names (+ tests)
…gnals-slots-syntax-library

# Conflicts:
#	src/library/library.cpp
#	src/library/scanner/libraryscanner.cpp
@ferranpujolcamins ferranpujolcamins merged commit 8599945 into ferranpujolcamins:new-signals-slots-syntax-library Sep 29, 2019
@uklotzde uklotzde deleted the new-signals-slots-syntax-library branch September 30, 2019 07:03
ferranpujolcamins pushed a commit that referenced this pull request May 7, 2022
…h sync

When loading a track that is not yet present in the library (and thus
doesn't have any BPM because it hasn't been analyzed yet) while another
deck is playing and both decks have sync enabled, a debug assertion is
triggered:

    DEBUG ASSERT: "isValid()" in function double mixxx::Bpm::value() const at src/track/bpm.h:53
    Aborted (core dumped)

The backtrace looks as follows:

    #0  0x00007f175c87234c in __pthread_kill_implementation () at /usr/lib/libc.so.6
    #1  0x00007f175c8254b8 in raise () at /usr/lib/libc.so.6
    #2  0x00007f175c80f534 in abort () at /usr/lib/libc.so.6
    #3  0x00007f175cf05ee4 in qt_assert(char const*, char const*, int) () at /usr/lib/libQt5Core.so.5
    #4  0x000055deb2e67e1c in mixxx::(anonymous namespace)::handleMessage(QtMsgType, QMessageLogContext const&, QString const&) (type=<optimized out>, context=<optimized out>, input=<optimized out>) at src/util/logging.cpp:355
    #5  0x00007f175cf47128 in  () at /usr/lib/libQt5Core.so.5
    #6  0x00007f175cf3fd8a in  () at /usr/lib/libQt5Core.so.5
    #7  0x00007f175cf06526 in QMessageLogger::critical(char const*, ...) const () at /usr/lib/libQt5Core.so.5
    #8  0x000055deb2e5c720 in mixxx_debug_assert(char const*, char const*, int, char const*) (assertion=assertion@entry=0x55deb39bd0db "isValid()", file=file@entry=0x55deb39bbf30 "src/track/bpm.h", line=line@entry=53, function=function@entry=0x55deb39bbf08 "double mixxx::Bpm::value() const") at gsrc/util/assert.h:9
    #9  0x000055deb2ee7e7e in mixxx_debug_assert_return_true(char const*, char const*, int, char const*) (function=0x55deb39bbf08 "double mixxx::Bpm::value() const", line=53, file=0x55deb39bbf30 "src/track/bpm.h", assertion=0x55deb39bd0db "isValid()") at gsrc/util/assert.h:18
    #10 mixxx::Bpm::value() const (this=<synthetic pointer>) at src/track/bpm.h:53
    #11 mixxx::operator*(mixxx::Bpm, double) (multiple=1, bpm=...) at src/track/bpm.h:160
    #12 SyncControl::setLocalBpm(mixxx::Bpm) (this=<optimized out>, localBpm=...) at src/engine/sync/synccontrol.cpp:567
    #13 0x000055deb34c7ba3 in EngineBuffer::postProcess(int) (this=0x55deb56eb060, iBufferSize=2048) at src/engine/enginebuffer.cpp:1318
    #14 0x000055deb3139023 in EngineMaster::processChannels(int) (this=0x55deb5449440, iBufferSize=<optimized out>) at src/engine/enginemaster.cpp:383
    #15 0x000055deb31394f7 in EngineMaster::process(int) (this=0x55deb5449440, iBufferSize=iBufferSize@entry=2048) at src/engine/enginemaster.cpp:410
    #16 0x000055deb2f91d0b in SoundManager::onDeviceOutputCallback(long) (this=<optimized out>, iFramesPerBuffer=iFramesPerBuffer@entry=1024) at src/soundio/soundmanager.cpp:596
    #17 0x000055deb32dd794 in SoundDevicePortAudio::callbackProcessClkRef(long, float*, float const*, PaStreamCallbackTimeInfo const*, unsigned long) (this=0x55deb553e6b0, framesPerBuffer=1024, out=<optimized out>, in=<optimized out>, timeInfo=<optimized out>, statusFlags=<optimized out>) at src/soundio/sounddeviceportaudio.cpp:965

This happens because `newLocalBpm` is invalid when `localBpm` is
invalid. Trying to do sync decks while no tempo information is available
does not make sense, so we only synchronize decks if the local BPM is
available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants