Merge lp://qastaging/~ywwg/mixxx/atomic-master-sync into lp://qastaging/~mixxxdevelopers/mixxx/trunk

Proposed by Owen Williams
Status: Needs review
Proposed branch: lp://qastaging/~ywwg/mixxx/atomic-master-sync
Merge into: lp://qastaging/~mixxxdevelopers/mixxx/trunk
Diff against target: 46744 lines (+38588/-2518)
82 files modified
mixxx/build/depends.py (+3/-3)
mixxx/res/controllers/Hercules-DJ-Control-MP3-scripts.js (+253/-682)
mixxx/res/controllers/Xone-K2-scripts.js.sync (+154/-0)
mixxx/res/skins/LateNight1280x800-WXGA/skin.xml (+118/-90)
mixxx/res/skins/LateNight1366x768-WXGA/skin.xml (+97/-58)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/CHANGELOG.txt (+216/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/channel.xml (+166/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/deck.xml (+1180/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/playback.xml (+586/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/skin.orig.xml (+6511/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/skin.resized.xml (+6511/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/skin.xml (+6808/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/skin.xml.orig (+6852/-0)
mixxx/res/skins/LateNight1920x1080-4Deck-WXGA/skin.xml~ (+6808/-0)
mixxx/src/controlbeat.cpp (+0/-85)
mixxx/src/controlbeat.h (+0/-59)
mixxx/src/controllers/controller.h (+0/-2)
mixxx/src/controllers/controllerengine.cpp (+6/-11)
mixxx/src/controllers/controllermanager.cpp (+0/-4)
mixxx/src/controllers/controllermanager.h (+0/-1)
mixxx/src/controllers/midi/midicontroller.cpp (+5/-16)
mixxx/src/controllers/midi/midioutputhandler.cpp (+11/-20)
mixxx/src/controllers/midi/midioutputhandler.h (+2/-2)
mixxx/src/controllers/softtakeover.cpp (+1/-1)
mixxx/src/controllinpotmeter.cpp (+5/-24)
mixxx/src/controllinpotmeter.h (+1/-10)
mixxx/src/controllogpotmeter.cpp (+11/-87)
mixxx/src/controllogpotmeter.h (+3/-21)
mixxx/src/controlnull.cpp (+0/-27)
mixxx/src/controlnull.h (+0/-34)
mixxx/src/controlobject.cpp (+64/-307)
mixxx/src/controlobject.h (+48/-117)
mixxx/src/controlobjectthread.cpp (+40/-69)
mixxx/src/controlobjectthread.h (+33/-35)
mixxx/src/controlobjectthreadmain.cpp (+14/-14)
mixxx/src/controlobjectthreadmain.h (+9/-24)
mixxx/src/controlobjectthreadwidget.cpp (+33/-46)
mixxx/src/controlobjectthreadwidget.h (+7/-10)
mixxx/src/controlpotmeter.cpp (+68/-135)
mixxx/src/controlpotmeter.h (+10/-12)
mixxx/src/controlpushbutton.cpp (+22/-50)
mixxx/src/controlpushbutton.h (+1/-7)
mixxx/src/controlttrotary.cpp (+9/-27)
mixxx/src/controlttrotary.h (+2/-12)
mixxx/src/controlvaluedelegate.cpp (+4/-0)
mixxx/src/dlgprefeq.cpp (+4/-2)
mixxx/src/dlgprefeq.h (+1/-1)
mixxx/src/dlgprefvinyl.cpp (+75/-2)
mixxx/src/dlgprefvinyl.h (+4/-0)
mixxx/src/dlgprefvinyldlg.ui (+123/-4)
mixxx/src/dlgtrackinfo.h (+9/-1)
mixxx/src/engine/bpmcontrol.cpp (+276/-75)
mixxx/src/engine/bpmcontrol.h (+35/-5)
mixxx/src/engine/enginebuffer.cpp (+42/-15)
mixxx/src/engine/enginebuffer.h (+2/-0)
mixxx/src/engine/enginechannel.cpp (+27/-0)
mixxx/src/engine/enginechannel.h (+8/-0)
mixxx/src/engine/enginemaster.cpp (+69/-6)
mixxx/src/engine/enginemaster.h (+5/-1)
mixxx/src/engine/enginesync.cpp (+420/-0)
mixxx/src/engine/enginesync.h (+84/-0)
mixxx/src/engine/loopingcontrol.cpp (+42/-23)
mixxx/src/engine/loopingcontrol.h (+42/-39)
mixxx/src/engine/ratecontrol.cpp (+207/-19)
mixxx/src/engine/ratecontrol.h (+40/-4)
mixxx/src/engine/syncworker.cpp (+0/-37)
mixxx/src/engine/syncworker.h (+0/-23)
mixxx/src/mixxx.cpp (+120/-16)
mixxx/src/mixxx.h (+6/-1)
mixxx/src/mixxxkeyboard.cpp (+2/-2)
mixxx/src/playermanager.cpp (+146/-52)
mixxx/src/playermanager.h (+21/-3)
mixxx/src/skin/legacyskinparser.cpp (+0/-10)
mixxx/src/skin/propertybinder.cpp (+1/-2)
mixxx/src/sounddeviceportaudio.cpp (+3/-2)
mixxx/src/soundmanager.cpp (+0/-6)
mixxx/src/soundmanager.h (+0/-2)
mixxx/src/vinylcontrol/vinylcontrolmanager.cpp (+40/-15)
mixxx/src/waveform/renderers/waveformmarkset.cpp (+2/-2)
mixxx/src/waveform/renderers/waveformrendererendoftrack.cpp (+1/-1)
mixxx/src/widget/wpushbutton.cpp (+2/-1)
mixxx/src/widget/wslidercomposed.cpp (+57/-44)
To merge this branch: bzr merge lp://qastaging/~ywwg/mixxx/atomic-master-sync
Reviewer Review Type Date Requested Status
RJ Skerry-Ryan Pending
Review via email: mp+164272@code.qastaging.launchpad.net

Description of the change

Master sync and atomic CO. Let's see how this goes

To post a comment you must log in.
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Non-engine code:

src/dlg*
- looks fine, enables 3/4

src/mixxx*
- looks fine, enables 3/4

src/vinylcontrol
- looks fine, enables 3/4

src/controlobject.cpp
- the warning should stay enabled ideally, it's a good clue for when users send us logs

src/controlvaluedelegate.cpp
- looks fine

src/playermanager*

- Hm, typically we decided deck orientation on whether the number was even odd. That's nice because you don't have to know the total number of decks to decide which ones go left/right. Why the change?

- The skin-num-decks isn't totally complete. For example, WTrackTableView context menu for load-to-deck doesn't use it.

- Need to do some bounds checking on the double value before casting it to int (pretty sure casting a negative floating point number to an unsigned integer is undefined behavior) or make m_skin_decks signed.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Download full text (3.2 KiB)

Nice work sofar! Here are some quick comments, mostly nits since I haven't fully wrapped my head around the actual logic.

* EngineSync::addDeck() -- connections should be Qt::DirectConnection

* EngineSync::disableDeckMaster() fail gracefully (and complain loudly) instead of Q_ASSERT. Every "should never happen" programming error manages to happen and bring down the party someday =).

* EngineSync::setMaster() -- redundant return; statement on last line (and in some other functions)

* EngineSync::setInternalMaster(void) -- void in argument list is redundant imo

* EngineSync::setDeckMaster(QString)

- deck == NULL should only be done if deck is a pointer. This will implicitly convert NULL into a QString and compare that with deck. That's fine because NULL will turn into an empty QString but it's probably not what you intended.

- prefer deck.isEmpty() instead of deck == ""

* EngineSync::slotSyncRateSliderChanged(double newBpm)

- is newBpm a BPM or a rate? m_pMasterBpm gets set to newBpm

* EngineSync::slotMasterBpmChanged

- handle error instead of Q_ASSERT

* EngineSync::slotDeckStateChanged

- unfortunately sender() can be NULL and it does happen in practice. This is usually in conjunction with MIDI script. Don't Q_ASSERT here :).

* EngineSync::updateSamplesPerBeat

- minor nit -- static_cast<double>(m_iFoo * 10.0) -- static_cast is redundant because the inner expression is already a double because an int * double is a double.

* enginesync.h

- Indentation is slightly off from the Mixxx standard. Access declarations (public/private/protected) should have 2-space indent and don't count as an indentation for all member/method declarations (so all members/methods ends up 4-spaces indented).

- Destructor should be virtual

- Generally, to reduce dependence across header files I prefer to forward declare Mixxx classes. (I don't forward declare Qt classes).

So, in this case if you aren't using anything other than a pointer in the header file you can forward declare:

ControlObject, ControlPushbutton, ControlPotmeter, EngineMaster, EngineBuffer.

- Another general thing is that pointer stars should go with the type instead of the variable name. For this reason, I avoid multiple variable declaration statements:

ControlObject *m_pSourceBeatDistance, *m_pMasterBeatDistance;

Because it isn't possible to attach the star to the type in this case. It's not super strict but this is the convention in most places in Mixxx.

* LoopingControl

- I'd prefer to not add accessor mehods to LoopingControl and instead use the control system to share the value.

* RateControl::setEngineMaster
- Why the duplicate m_pEngineMaster variable w/ EngineControl?

* RateControl::slotSyncMasterChanged

- I've seen this in a couple places, if (dValue) { } relies on implicit conversion from double to boolean. Instead, be explicit (and to stick with convention elsewhere, only positive values count for a trigger from a control if (dValue > 0) { ... }.

* EngineChannel -- LGTM

* EngineMaster -- reduce copypasta in deciding whether to process a deck with an inline utility function?

BpmControl / RateControl / EngineSync / EngineBuffer is clearly The ...

Read more...

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Regarding ASSERTs, we really should make a timeline to start disabling QDebug in release builds which also disables asserts. I'll make a blueprint for that now.

Revision history for this message
Owen Williams (ywwg) wrote :

I'll write up a proper design document today. The Big Idea is that all decks report bpm and position information, and the EngineSync listens to whoever is master and writes that information to the master sync COs. The slaves then only have to listen to that one set of COs and they'll get the correct information no matter which deck is master.

Revision history for this message
Owen Williams (ywwg) wrote :

> Non-engine code:
>
>
> src/controlobject.cpp
> - the warning should stay enabled ideally, it's a good clue for when users
> send us logs

Oh right. Normally I suppress this because it causes a lot of spew. I'll remove that.

>
>
> src/playermanager*
>
> - Hm, typically we decided deck orientation on whether the number was even
> odd. That's nice because you don't have to know the total number of decks to
> decide which ones go left/right. Why the change?

This is something I'm really not sure about. With a four deck mixer, the pots are numbered:

1, 2, 3, 4

So 1 and 2 are on the left, and 3 and 4 are on the right. Calling 3 a left deck is totally counter-intuitive to me. However most 4-channel mixers have A/B switches so that any deck can be aligned left right or center.

>
> - The skin-num-decks isn't totally complete. For example, WTrackTableView
> context menu for load-to-deck doesn't use it.

OK. Do you agree with the general idea that Mixxx should know how many decks the UI has? That way it wouldn't load tracks into an invisible 3rd deck (since right now we don't support removing decks once they are created).

>
> - Need to do some bounds checking on the double value before casting it to int
> (pretty sure casting a negative floating point number to an unsigned integer
> is undefined behavior) or make m_skin_decks signed.

ok

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

"Calling 3 a left deck is totally counter-intuitive to me."

Sure, for a 4-channel mixer, but many 4-channel controllers use 1 & 3 on the left, and 2 & 4 on the right (like the Terminal Mix 2/4, VMS4, etc.)

Revision history for this message
Owen Williams (ywwg) wrote :

RJ and I discussed the 4 deck naming issue. It appears there are many way of number decks, including on controllers:

ABCD
CABD
ACDB

We will have to support whatever the user wants. but that is out of scope for this patch -- I will remove that change.

Revision history for this message
Owen Williams (ywwg) wrote :

Moving this discussion to: https://github.com/mixxxdj/mixxx/pull/1

Revision history for this message
Owen Williams (ywwg) wrote :

Unmerged revisions

3373. By Owen Williams

Apply master sync and atomic-co patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches