Merge lp:~daschuer/mixxx/atomic-co into lp:~mixxxdevelopers/mixxx/atomic-co

Proposed by Daniel Schürmann
Status: Needs review
Proposed branch: lp:~daschuer/mixxx/atomic-co
Merge into: lp:~mixxxdevelopers/mixxx/atomic-co
Diff against target: 416 lines (+59/-76)
12 files modified
mixxx/src/control/control.cpp (+10/-7)
mixxx/src/control/control.h (+6/-6)
mixxx/src/control/controlbehavior.cpp (+20/-14)
mixxx/src/control/controlbehavior.h (+6/-3)
mixxx/src/controllers/midi/midicontroller.cpp (+1/-1)
mixxx/src/controlobject.cpp (+5/-12)
mixxx/src/controlobject.h (+0/-3)
mixxx/src/controlobjectthread.cpp (+1/-1)
mixxx/src/engine/bpmcontrol.cpp (+0/-9)
mixxx/src/engine/enginebuffer.cpp (+0/-3)
mixxx/src/engine/ratecontrol.cpp (+0/-6)
mixxx/src/vinylcontrol/vinylcontrolmanager.cpp (+10/-11)
To merge this branch: bzr merge lp:~daschuer/mixxx/atomic-co
Reviewer Review Type Date Requested Status
Daniel Schürmann Needs Fixing
Review via email: mp+164281@code.launchpad.net

Description of the change

See commit log

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

We have to keep valueChangedFromEngine. It's important to be able to react
to internal sets of controls. For example this breaks BpmControl reacting
to engine rate changes. Try hitting the sync button. The BPM text won't
change.
On May 16, 2013 7:49 PM, "Daniel Schürmann" <email address hidden> wrote:

> Daniel Schürmann has proposed merging lp:~daschuer/mixxx/atomic-co into
> lp:~mixxxdevelopers/mixxx/atomic-co.
>
> Requested reviews:
> Mixxx Development Team (mixxxdevelopers)
>
> For more details, see:
> https://code.launchpad.net/~daschuer/mixxx/atomic-co/+merge/164281
>
> See commit log
> --
> https://code.launchpad.net/~daschuer/mixxx/atomic-co/+merge/164281
> Your team Mixxx Development Team is requested to review the proposed merge
> of lp:~daschuer/mixxx/atomic-co into lp:~mixxxdevelopers/mixxx/atomic-co.
>
> === modified file 'mixxx/src/control/control.cpp'
> --- mixxx/src/control/control.cpp 2013-05-16 01:40:06 +0000
> +++ mixxx/src/control/control.cpp 2013-05-16 23:48:28 +0000
> @@ -77,9 +77,12 @@
> return m_value.getValue();
> }
>
> -void ControlDoublePrivate::reset(QObject* pSender) {
> +void ControlDoublePrivate::reset() {
> double defaultValue = m_defaultValue.getValue();
> - set(defaultValue, pSender);
> + // NOTE: pSender = NULL is important. The originator of this action
> does
> + // not know the resulting value so it makes sense that we should emit
> a
> + // general valueChanged() signal even though we know the originator.
> + set(defaultValue, NULL);
> }
>
> void ControlDoublePrivate::set(const double& value, QObject* pSender) {
> @@ -106,9 +109,9 @@
> return m_pBehavior.fetchAndStoreRelaxed(pBehavior);
> }
>
> -void ControlDoublePrivate::setWidgetParameter(double dParam, QObject*
> pSetter) {
> +void ControlDoublePrivate::setWidgetParameter(double dParam, QObject*
> pSender) {
> ControlNumericBehavior* pBehavior = m_pBehavior;
> - set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam,
> pSetter);
> + set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam,
> pSender);
> }
>
> double ControlDoublePrivate::getWidgetParameter() const {
> @@ -116,12 +119,12 @@
> return pBehavior ? pBehavior->valueToWidgetParameter(get()) : get();
> }
>
> -void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double
> dParam) {
> +void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double
> dParam, QObject* pSender) {
> ControlNumericBehavior* pBehavior = m_pBehavior;
> if (pBehavior) {
> - pBehavior->setValueFromMidiParameter(opcode, dParam, this);
> + pBehavior->setValueFromMidiParameter(opcode, dParam, this,
> pSender);
> } else {
> - set(dParam, NULL);
> + set(dParam, pSender);
> }
> }
>
>
> === modified file 'mixxx/src/control/control.h'
> --- mixxx/src/control/control.h 2013-05-16 01:40:06 +0000
> +++ mixxx/src/control/control.h 2013-05-16 23:48:28 +0000
> @@ -32,11 +32,11 @@
> }
>
> // Sets the control value.
> - void set(const double& value, QObject* pSetter);
> + void set(const double& value, QObject* pSender);
> // Gets the control value.
> double get...

Revision history for this message
Daniel Schürmann (daschuer) wrote :

For me this is an issue from BpmControl.
In slotControlBeatSync it sets a value to m_pRateSlider and rely on the call of slotAdjustBpm.
Simply calling slotAdjustBpm manually will fix this.

I think we must have a close look to
mixxx/src/engine/ratecontrol.cpp
mixxx/src/engine/enginebuffer.cpp
mixxx/src/engine/bpmcontrol.cpp'
to find out similar issues and than it should be safe.

I like to do these changes, because it makes the code better understandable.

Our whole discussion convinced me, that it is the best approach:
NEVER receive a loopback value change signal.

review: Needs Fixing
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

This means all engine logic will become entangled. Take pitch bend for
example. Will you call slotadjustbpm from RateController? This will get bad
very quickly.
On May 17, 2013 2:12 AM, "Daniel Schürmann" <email address hidden> wrote:

> Review: Needs Fixing
>
> For me this is an issue from BpmControl.
> In slotControlBeatSync it sets a value to m_pRateSlider and rely on the
> call of slotAdjustBpm.
> Simply calling slotAdjustBpm manually will fix this.
>
> I think we must have a close look to
> mixxx/src/engine/ratecontrol.cpp
> mixxx/src/engine/enginebuffer.cpp
> mixxx/src/engine/bpmcontrol.cpp'
> to find out similar issues and than it should be safe.
>
> I like to do these changes, because it makes the code better
> understandable.
>
> Our whole discussion convinced me, that it is the best approach:
> NEVER receive a loopback value change signal.
>
>
> --
> https://code.launchpad.net/~daschuer/mixxx/atomic-co/+merge/164281
> Your team Mixxx Development Team is subscribed to branch
> lp:~mixxxdevelopers/mixxx/atomic-co.
>

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Ah, I think I have got the point!

In the old model, we had a signal per thread and a thread based valve Logic.

Now, it is moved to CO/COT

So if RateControl sets "rate" it is done by his own private member m_pRateSlider which carry the valve logic.
BpmControl has an other private m_pRateSlider with its own valve logic.
So BpmControll will receive all updates from RateControl, (unless there is no bug ;-))

So we have now the benefit that two objects in the same thread can communicate via COs by a common interface :-))
Great!

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Sure -- even the engine could use COTs now, but this is a more significant change than should be dealt with in this patch and something that IMO should wait until Control 2.0 is done (or even until the CO/COT are out of the engine completely a-la engine-control-refactor). I'm going to merge lp:~mixxxdevelopers/mixxx/atomic-co now.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

For me CO and COT behave almost similar already. So the change is nothing more than run a refactor-rename. :-)

lp:~daschuer/mixxx/atomic-co updated
3369. By Daniel Schürmann

merged from lp:~mixxxdevelopers/mixxx/atomic-co

Unmerged revisions

3369. By Daniel Schürmann

merged from lp:~mixxxdevelopers/mixxx/atomic-co

3368. By Daniel Schürmann

removed pSender from ControlDoublePrivate::reset()

3367. By Daniel Schürmann

removed setValueFromThread

3366. By Daniel Schürmann

added pSender to setMidiParameter

3365. By Daniel Schürmann

unified word choice for pSender, pSetter is the a function pointer to set() for me

3364. By Daniel Schürmann

removed valueChangedFromEngine()

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mixxx/src/control/control.cpp'
--- mixxx/src/control/control.cpp 2013-06-04 00:42:24 +0000
+++ mixxx/src/control/control.cpp 2013-06-09 22:05:30 +0000
@@ -77,9 +77,12 @@
77 return m_value.getValue();77 return m_value.getValue();
78}78}
7979
80void ControlDoublePrivate::reset(QObject* pSender) {80void ControlDoublePrivate::reset() {
81 double defaultValue = m_defaultValue.getValue();81 double defaultValue = m_defaultValue.getValue();
82 set(defaultValue, pSender);82 // NOTE: pSender = NULL is important. The originator of this action does
83 // not know the resulting value so it makes sense that we should emit a
84 // general valueChanged() signal even though we know the originator.
85 set(defaultValue, NULL);
83}86}
8487
85void ControlDoublePrivate::set(const double& value, QObject* pSender) {88void ControlDoublePrivate::set(const double& value, QObject* pSender) {
@@ -106,9 +109,9 @@
106 return m_pBehavior.fetchAndStoreRelaxed(pBehavior);109 return m_pBehavior.fetchAndStoreRelaxed(pBehavior);
107}110}
108111
109void ControlDoublePrivate::setWidgetParameter(double dParam, QObject* pSetter) {112void ControlDoublePrivate::setWidgetParameter(double dParam, QObject* pSender) {
110 ControlNumericBehavior* pBehavior = m_pBehavior;113 ControlNumericBehavior* pBehavior = m_pBehavior;
111 set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam, pSetter);114 set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam, pSender);
112}115}
113116
114double ControlDoublePrivate::getWidgetParameter() const {117double ControlDoublePrivate::getWidgetParameter() const {
@@ -116,12 +119,12 @@
116 return pBehavior ? pBehavior->valueToWidgetParameter(get()) : get();119 return pBehavior ? pBehavior->valueToWidgetParameter(get()) : get();
117}120}
118121
119void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double dParam) {122void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double dParam, QObject* pSender) {
120 ControlNumericBehavior* pBehavior = m_pBehavior;123 ControlNumericBehavior* pBehavior = m_pBehavior;
121 if (pBehavior) {124 if (pBehavior) {
122 pBehavior->setValueFromMidiParameter(opcode, dParam, this);125 pBehavior->setValueFromMidiParameter(opcode, dParam, this, pSender);
123 } else {126 } else {
124 set(dParam, NULL);127 set(dParam, pSender);
125 }128 }
126}129}
127130
128131
=== modified file 'mixxx/src/control/control.h'
--- mixxx/src/control/control.h 2013-05-16 01:40:06 +0000
+++ mixxx/src/control/control.h 2013-06-09 22:05:30 +0000
@@ -32,11 +32,11 @@
32 }32 }
3333
34 // Sets the control value.34 // Sets the control value.
35 void set(const double& value, QObject* pSetter);35 void set(const double& value, QObject* pSender);
36 // Gets the control value.36 // Gets the control value.
37 double get() const;37 double get() const;
38 // Resets the control value to its default.38 // Resets the control value to its default.
39 void reset(QObject* pSetter);39 void reset();
4040
41 // Set the behavior to be used when setting values and translating between41 // Set the behavior to be used when setting values and translating between
42 // parameter and value space. Returns the previously set behavior (if any).42 // parameter and value space. Returns the previously set behavior (if any).
@@ -44,10 +44,10 @@
44 // memory will leak.44 // memory will leak.
45 ControlNumericBehavior* setBehavior(ControlNumericBehavior* pBehavior);45 ControlNumericBehavior* setBehavior(ControlNumericBehavior* pBehavior);
4646
47 void setWidgetParameter(double dParam, QObject* pSetter);47 void setWidgetParameter(double dParam, QObject* pSender);
48 double getWidgetParameter() const;48 double getWidgetParameter() const;
4949
50 void setMidiParameter(MidiOpCode opcode, double dParam);50 void setMidiParameter(MidiOpCode opcode, double dParam, QObject* pSender);
51 double getMidiParameter() const;51 double getMidiParameter() const;
5252
53 inline bool ignoreNops() const {53 inline bool ignoreNops() const {
@@ -63,9 +63,9 @@
63 }63 }
6464
65 signals:65 signals:
66 // Emitted when the ControlDoublePrivate value changes. pSetter is a66 // Emitted when the ControlDoublePrivate value changes. pSender is a
67 // pointer to the setter of the value (potentially NULL).67 // pointer to the setter of the value (potentially NULL).
68 void valueChanged(double value, QObject* pSetter);68 void valueChanged(double value, QObject* pSender);
6969
70 private:70 private:
71 ConfigKey m_key;71 ConfigKey m_key;
7272
=== modified file 'mixxx/src/control/controlbehavior.cpp'
--- mixxx/src/control/controlbehavior.cpp 2013-05-19 10:55:28 +0000
+++ mixxx/src/control/controlbehavior.cpp 2013-06-09 22:05:30 +0000
@@ -23,9 +23,10 @@
23}23}
2424
25void ControlNumericBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,25void ControlNumericBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,
26 ControlDoublePrivate* pControl) {26 ControlDoublePrivate* pControl,
27 QObject* pSender) {
27 Q_UNUSED(o);28 Q_UNUSED(o);
28 pControl->set(dParam, NULL);29 pControl->set(dParam, pSender);
29}30}
3031
31ControlPotmeterBehavior::ControlPotmeterBehavior(double dMinValue, double dMaxValue)32ControlPotmeterBehavior::ControlPotmeterBehavior(double dMinValue, double dMaxValue)
@@ -67,9 +68,10 @@
67}68}
6869
69void ControlPotmeterBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,70void ControlPotmeterBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,
70 ControlDoublePrivate* pControl) {71 ControlDoublePrivate* pControl,
72 QObject* pSender) {
71 Q_UNUSED(o);73 Q_UNUSED(o);
72 pControl->set(widgetParameterToValue(dParam), NULL);74 pControl->set(widgetParameterToValue(dParam), pSender);
73}75}
7476
75#define maxPosition 12777#define maxPosition 127
@@ -161,47 +163,51 @@
161}163}
162164
163void ControlPushButtonBehavior::setValueFromMidiParameter(165void ControlPushButtonBehavior::setValueFromMidiParameter(
164 MidiOpCode o, double dParam, ControlDoublePrivate* pControl) {166 MidiOpCode o, double dParam, ControlDoublePrivate* pControl, QObject* pSender) {
165 // This block makes push-buttons act as power window buttons.167 // This block makes push-buttons act as power window buttons.
166 if (m_buttonMode == POWERWINDOW && m_iNumStates == 2) {168 if (m_buttonMode == POWERWINDOW && m_iNumStates == 2) {
167 if (o == MIDI_NOTE_ON) {169 if (o == MIDI_NOTE_ON) {
168 if (dParam > 0.) {170 if (dParam > 0.) {
169 double value = pControl->get();171 double value = pControl->get();
170 pControl->set(!value, NULL);172 pControl->set(!value, pSender);
171 m_pushTimer.setSingleShot(true);173 m_pushTimer.setSingleShot(true);
172 m_pushTimer.start(kPowerWindowTimeMillis);174 m_pushTimer.start(kPowerWindowTimeMillis);
173 }175 }
174 } else if (o == MIDI_NOTE_OFF) {176 } else if (o == MIDI_NOTE_OFF) {
175 if (!m_pushTimer.isActive()) {177 if (!m_pushTimer.isActive()) {
176 pControl->set(0.0, NULL);178 pControl->set(0.0, pSender);
177 }179 }
178 }180 }
179 } else if (m_buttonMode == TOGGLE) {181 } else if (m_buttonMode == TOGGLE) {
180 // This block makes push-buttons act as toggle buttons.182 // This block makes push-buttons act as toggle buttons.
181 if (m_iNumStates > 2) { //multistate button183 if (m_iNumStates > 2) { // multistate button
182 if (dParam > 0.) { //looking for NOTE_ON doesn't seem to work...184 if (dParam > 0.) { // looking for NOTE_ON doesn't seem to work...
185 // This is a possible race condition if an other writer wants
186 // to change the value at the same time. We allow the race her,
187 // because this is possible what the user expect if he controls
188 // the same control from different devices.
183 double value = pControl->get();189 double value = pControl->get();
184 value++;190 value++;
185 if (value >= m_iNumStates) {191 if (value >= m_iNumStates) {
186 pControl->set(0, NULL);192 pControl->set(0, pSender);
187 } else {193 } else {
188 pControl->set(value, NULL);194 pControl->set(value, pSender);
189 }195 }
190 }196 }
191 } else {197 } else {
192 if (o == MIDI_NOTE_ON) {198 if (o == MIDI_NOTE_ON) {
193 if (dParam > 0.) {199 if (dParam > 0.) {
194 double value = pControl->get();200 double value = pControl->get();
195 pControl->set(!value, NULL);201 pControl->set(!value, pSender);
196 }202 }
197 }203 }
198 }204 }
199 } else { //Not a toggle button (trigger only when button pushed)205 } else { //Not a toggle button (trigger only when button pushed)
200 if (o == MIDI_NOTE_ON) {206 if (o == MIDI_NOTE_ON) {
201 double value = pControl->get();207 double value = pControl->get();
202 pControl->set(!value, NULL);208 pControl->set(!value, pSender);
203 } else if (o == MIDI_NOTE_OFF) {209 } else if (o == MIDI_NOTE_OFF) {
204 pControl->set(0.0, NULL);210 pControl->set(0.0, pSender);
205 }211 }
206 }212 }
207}213}
208214
=== modified file 'mixxx/src/control/controlbehavior.h'
--- mixxx/src/control/controlbehavior.h 2013-05-19 10:55:28 +0000
+++ mixxx/src/control/controlbehavior.h 2013-06-09 22:05:30 +0000
@@ -21,7 +21,8 @@
21 virtual double widgetParameterToValue(double dParam);21 virtual double widgetParameterToValue(double dParam);
22 virtual double valueToMidiParameter(double dValue);22 virtual double valueToMidiParameter(double dValue);
23 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,23 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
24 ControlDoublePrivate* pControl);24 ControlDoublePrivate* pControl,
25 QObject* pSender);
25};26};
2627
27class ControlPotmeterBehavior : public ControlNumericBehavior {28class ControlPotmeterBehavior : public ControlNumericBehavior {
@@ -35,7 +36,8 @@
35 virtual double widgetParameterToValue(double dParam);36 virtual double widgetParameterToValue(double dParam);
36 virtual double valueToMidiParameter(double dValue);37 virtual double valueToMidiParameter(double dValue);
37 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,38 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
38 ControlDoublePrivate* pControl);39 ControlDoublePrivate* pControl,
40 QObject* pSender);
3941
40 protected:42 protected:
41 double m_dMinValue;43 double m_dMinValue;
@@ -87,7 +89,8 @@
8789
88 ControlPushButtonBehavior(ButtonMode buttonMode, int iNumStates);90 ControlPushButtonBehavior(ButtonMode buttonMode, int iNumStates);
89 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,91 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
90 ControlDoublePrivate* pControl);92 ControlDoublePrivate* pControl,
93 QObject* pSender);
9194
92 private:95 private:
93 ButtonMode m_buttonMode;96 ButtonMode m_buttonMode;
9497
=== modified file 'mixxx/src/controllers/midi/midicontroller.cpp'
--- mixxx/src/controllers/midi/midicontroller.cpp 2013-05-16 00:14:12 +0000
+++ mixxx/src/controllers/midi/midicontroller.cpp 2013-06-09 22:05:30 +0000
@@ -356,7 +356,7 @@
356 return;356 return;
357 }357 }
358 }358 }
359 p->setValueFromThread(newValue, NULL);359 p->set(newValue);
360 } else {360 } else {
361 if (options.soft_takeover) {361 if (options.soft_takeover) {
362 if (m_st.ignore(p, newValue, true)) {362 if (m_st.ignore(p, newValue, true)) {
363363
=== modified file 'mixxx/src/controlobject.cpp'
--- mixxx/src/controlobject.cpp 2013-05-17 16:33:04 +0000
+++ mixxx/src/controlobject.cpp 2013-06-09 22:05:30 +0000
@@ -64,12 +64,11 @@
64 m_sqCOHashMutex.unlock();64 m_sqCOHashMutex.unlock();
65}65}
6666
67void ControlObject::privateValueChanged(double dValue, QObject* pSetter) {67// slot
68void ControlObject::privateValueChanged(double dValue, QObject* pSender) {
68 // Only emit valueChanged() if we did not originate this change.69 // Only emit valueChanged() if we did not originate this change.
69 if (pSetter != this) {70 if (pSender != this) {
70 emit(valueChanged(dValue));71 emit(valueChanged(dValue));
71 } else {
72 emit(valueChangedFromEngine(dValue));
73 }72 }
74}73}
7574
@@ -128,7 +127,7 @@
128127
129void ControlObject::setValueFromMidi(MidiOpCode o, double v) {128void ControlObject::setValueFromMidi(MidiOpCode o, double v) {
130 if (m_pControl) {129 if (m_pControl) {
131 m_pControl->setMidiParameter(o, v);130 m_pControl->setMidiParameter(o, v, this);
132 }131 }
133}132}
134133
@@ -136,19 +135,13 @@
136 return m_pControl ? m_pControl->getMidiParameter() : 0.0;135 return m_pControl ? m_pControl->getMidiParameter() : 0.0;
137}136}
138137
139void ControlObject::setValueFromThread(double dValue, QObject* pSender) {
140 if (m_pControl) {
141 m_pControl->set(dValue, pSender);
142 }
143}
144
145double ControlObject::get() const {138double ControlObject::get() const {
146 return m_pControl ? m_pControl->get() : 0.0;139 return m_pControl ? m_pControl->get() : 0.0;
147}140}
148141
149void ControlObject::reset() {142void ControlObject::reset() {
150 if (m_pControl) {143 if (m_pControl) {
151 m_pControl->reset(this);144 m_pControl->reset();
152 }145 }
153}146}
154147
155148
=== modified file 'mixxx/src/controlobject.h'
--- mixxx/src/controlobject.h 2013-05-17 16:33:04 +0000
+++ mixxx/src/controlobject.h 2013-06-09 22:05:30 +0000
@@ -66,15 +66,12 @@
6666
67 signals:67 signals:
68 void valueChanged(double);68 void valueChanged(double);
69 void valueChangedFromEngine(double);
7069
71 public:70 public:
72 // DEPRECATED: Called to set the control value from the controller71 // DEPRECATED: Called to set the control value from the controller
73 // subsystem.72 // subsystem.
74 virtual void setValueFromMidi(MidiOpCode o, double v);73 virtual void setValueFromMidi(MidiOpCode o, double v);
75 virtual double getValueToMidi() const;74 virtual double getValueToMidi() const;
76 // DEPRECATED: Called to set the control value from another thread.
77 virtual void setValueFromThread(double dValue, QObject* pSetter);
7875
79 protected:76 protected:
80 // Key of the object77 // Key of the object
8178
=== modified file 'mixxx/src/controlobjectthread.cpp'
--- mixxx/src/controlobjectthread.cpp 2013-06-04 02:31:32 +0000
+++ mixxx/src/controlobjectthread.cpp 2013-06-09 22:05:30 +0000
@@ -70,7 +70,7 @@
70 // general valueChanged() signal even though the change originated from70 // general valueChanged() signal even though the change originated from
71 // us. For this reason, we provide NULL here so that the change is71 // us. For this reason, we provide NULL here so that the change is
72 // broadcast as valueChanged() and not valueChangedByThis().72 // broadcast as valueChanged() and not valueChangedByThis().
73 m_pControl->reset(NULL);73 m_pControl->reset();
74 }74 }
75}75}
7676
7777
=== modified file 'mixxx/src/engine/bpmcontrol.cpp'
--- mixxx/src/engine/bpmcontrol.cpp 2013-06-04 18:09:35 +0000
+++ mixxx/src/engine/bpmcontrol.cpp 2013-06-09 22:05:30 +0000
@@ -26,25 +26,16 @@
26 connect(m_pRateSlider, SIGNAL(valueChanged(double)),26 connect(m_pRateSlider, SIGNAL(valueChanged(double)),
27 this, SLOT(slotAdjustBpm()),27 this, SLOT(slotAdjustBpm()),
28 Qt::DirectConnection);28 Qt::DirectConnection);
29 connect(m_pRateSlider, SIGNAL(valueChangedFromEngine(double)),
30 this, SLOT(slotAdjustBpm()),
31 Qt::DirectConnection);
3229
33 m_pRateRange = ControlObject::getControl(ConfigKey(_group, "rateRange"));30 m_pRateRange = ControlObject::getControl(ConfigKey(_group, "rateRange"));
34 connect(m_pRateRange, SIGNAL(valueChanged(double)),31 connect(m_pRateRange, SIGNAL(valueChanged(double)),
35 this, SLOT(slotAdjustBpm()),32 this, SLOT(slotAdjustBpm()),
36 Qt::DirectConnection);33 Qt::DirectConnection);
37 connect(m_pRateRange, SIGNAL(valueChangedFromEngine(double)),
38 this, SLOT(slotAdjustBpm()),
39 Qt::DirectConnection);
4034
41 m_pRateDir = ControlObject::getControl(ConfigKey(_group, "rate_dir"));35 m_pRateDir = ControlObject::getControl(ConfigKey(_group, "rate_dir"));
42 connect(m_pRateDir, SIGNAL(valueChanged(double)),36 connect(m_pRateDir, SIGNAL(valueChanged(double)),
43 this, SLOT(slotAdjustBpm()),37 this, SLOT(slotAdjustBpm()),
44 Qt::DirectConnection);38 Qt::DirectConnection);
45 connect(m_pRateDir, SIGNAL(valueChangedFromEngine(double)),
46 this, SLOT(slotAdjustBpm()),
47 Qt::DirectConnection);
4839
49 m_pLoopEnabled = ControlObject::getControl(40 m_pLoopEnabled = ControlObject::getControl(
50 ConfigKey(_group, "loop_enabled"));41 ConfigKey(_group, "loop_enabled"));
5142
=== modified file 'mixxx/src/engine/enginebuffer.cpp'
--- mixxx/src/engine/enginebuffer.cpp 2013-06-09 04:01:53 +0000
+++ mixxx/src/engine/enginebuffer.cpp 2013-06-09 22:05:30 +0000
@@ -147,9 +147,6 @@
147 connect(m_pSlipButton, SIGNAL(valueChanged(double)),147 connect(m_pSlipButton, SIGNAL(valueChanged(double)),
148 this, SLOT(slotControlSlip(double)),148 this, SLOT(slotControlSlip(double)),
149 Qt::DirectConnection);149 Qt::DirectConnection);
150 connect(m_pSlipButton, SIGNAL(valueChangedFromEngine(double)),
151 this, SLOT(slotControlSlip(double)),
152 Qt::DirectConnection);
153 m_pSlipPosition = new ControlObject(ConfigKey(m_group, "slip_playposition"));150 m_pSlipPosition = new ControlObject(ConfigKey(m_group, "slip_playposition"));
154151
155 // Actual rate (used in visuals, not for control)152 // Actual rate (used in visuals, not for control)
156153
=== modified file 'mixxx/src/engine/ratecontrol.cpp'
--- mixxx/src/engine/ratecontrol.cpp 2013-05-15 23:01:31 +0000
+++ mixxx/src/engine/ratecontrol.cpp 2013-06-09 22:05:30 +0000
@@ -153,9 +153,6 @@
153 connect(pVCEnabled, SIGNAL(valueChanged(double)),153 connect(pVCEnabled, SIGNAL(valueChanged(double)),
154 this, SLOT(slotControlVinyl(double)),154 this, SLOT(slotControlVinyl(double)),
155 Qt::DirectConnection);155 Qt::DirectConnection);
156 connect(pVCEnabled, SIGNAL(valueChangedFromEngine(double)),
157 this, SLOT(slotControlVinyl(double)),
158 Qt::DirectConnection);
159156
160 ControlObject* pVCScratching = ControlObject::getControl(ConfigKey(_group, "vinylcontrol_scratching"));157 ControlObject* pVCScratching = ControlObject::getControl(ConfigKey(_group, "vinylcontrol_scratching"));
161 // Throw a hissy fit if somebody moved us such that the vinylcontrol_enabled158 // Throw a hissy fit if somebody moved us such that the vinylcontrol_enabled
@@ -164,9 +161,6 @@
164 connect(pVCScratching, SIGNAL(valueChanged(double)),161 connect(pVCScratching, SIGNAL(valueChanged(double)),
165 this, SLOT(slotControlVinylScratching(double)),162 this, SLOT(slotControlVinylScratching(double)),
166 Qt::DirectConnection);163 Qt::DirectConnection);
167 connect(pVCScratching, SIGNAL(valueChangedFromEngine(double)),
168 this, SLOT(slotControlVinylScratching(double)),
169 Qt::DirectConnection);
170#endif164#endif
171}165}
172166
173167
=== modified file 'mixxx/src/vinylcontrol/vinylcontrolmanager.cpp'
--- mixxx/src/vinylcontrol/vinylcontrolmanager.cpp 2013-06-08 16:58:22 +0000
+++ mixxx/src/vinylcontrol/vinylcontrolmanager.cpp 2013-06-09 22:05:30 +0000
@@ -52,22 +52,21 @@
52void VinylControlManager::init() {52void VinylControlManager::init() {
53 // Load saved preferences now that the objects exist53 // Load saved preferences now that the objects exist
54 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_enabled"))54 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_enabled"))
55 ->setValueFromThread(0, NULL);55 ->set(0);
56 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_enabled"))56 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_enabled"))
57 ->setValueFromThread(0, NULL);57 ->set(0);
58
59 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_mode"))58 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_mode"))
60 ->setValueFromThread(m_pConfig->getValueString(59 ->set(m_pConfig->getValueString(
61 ConfigKey(VINYL_PREF_KEY,"mode")).toDouble(), NULL);60 ConfigKey(VINYL_PREF_KEY,"mode")).toDouble());
62 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_mode"))61 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_mode"))
63 ->setValueFromThread(m_pConfig->getValueString(62 ->set(m_pConfig->getValueString(
64 ConfigKey(VINYL_PREF_KEY,"mode")).toDouble(), NULL);63 ConfigKey(VINYL_PREF_KEY,"mode")).toDouble());
65 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_cueing"))64 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_cueing"))
66 ->setValueFromThread(m_pConfig->getValueString(65 ->set(m_pConfig->getValueString(
67 ConfigKey(VINYL_PREF_KEY,"cueing_ch1")).toDouble(), NULL);66 ConfigKey(VINYL_PREF_KEY,"cueing_ch1")).toDouble());
68 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_cueing"))67 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_cueing"))
69 ->setValueFromThread(m_pConfig->getValueString(68 ->set(m_pConfig->getValueString(
70 ConfigKey(VINYL_PREF_KEY,"cueing_ch2")).toDouble(), NULL);69 ConfigKey(VINYL_PREF_KEY,"cueing_ch2")).toDouble());
71}70}
7271
73void VinylControlManager::requestReloadConfig() {72void VinylControlManager::requestReloadConfig() {

Subscribers

People subscribed via source and target branches