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
1=== modified file 'mixxx/src/control/control.cpp'
2--- mixxx/src/control/control.cpp 2013-06-04 00:42:24 +0000
3+++ mixxx/src/control/control.cpp 2013-06-09 22:05:30 +0000
4@@ -77,9 +77,12 @@
5 return m_value.getValue();
6 }
7
8-void ControlDoublePrivate::reset(QObject* pSender) {
9+void ControlDoublePrivate::reset() {
10 double defaultValue = m_defaultValue.getValue();
11- set(defaultValue, pSender);
12+ // NOTE: pSender = NULL is important. The originator of this action does
13+ // not know the resulting value so it makes sense that we should emit a
14+ // general valueChanged() signal even though we know the originator.
15+ set(defaultValue, NULL);
16 }
17
18 void ControlDoublePrivate::set(const double& value, QObject* pSender) {
19@@ -106,9 +109,9 @@
20 return m_pBehavior.fetchAndStoreRelaxed(pBehavior);
21 }
22
23-void ControlDoublePrivate::setWidgetParameter(double dParam, QObject* pSetter) {
24+void ControlDoublePrivate::setWidgetParameter(double dParam, QObject* pSender) {
25 ControlNumericBehavior* pBehavior = m_pBehavior;
26- set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam, pSetter);
27+ set(pBehavior ? pBehavior->widgetParameterToValue(dParam) : dParam, pSender);
28 }
29
30 double ControlDoublePrivate::getWidgetParameter() const {
31@@ -116,12 +119,12 @@
32 return pBehavior ? pBehavior->valueToWidgetParameter(get()) : get();
33 }
34
35-void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double dParam) {
36+void ControlDoublePrivate::setMidiParameter(MidiOpCode opcode, double dParam, QObject* pSender) {
37 ControlNumericBehavior* pBehavior = m_pBehavior;
38 if (pBehavior) {
39- pBehavior->setValueFromMidiParameter(opcode, dParam, this);
40+ pBehavior->setValueFromMidiParameter(opcode, dParam, this, pSender);
41 } else {
42- set(dParam, NULL);
43+ set(dParam, pSender);
44 }
45 }
46
47
48=== modified file 'mixxx/src/control/control.h'
49--- mixxx/src/control/control.h 2013-05-16 01:40:06 +0000
50+++ mixxx/src/control/control.h 2013-06-09 22:05:30 +0000
51@@ -32,11 +32,11 @@
52 }
53
54 // Sets the control value.
55- void set(const double& value, QObject* pSetter);
56+ void set(const double& value, QObject* pSender);
57 // Gets the control value.
58 double get() const;
59 // Resets the control value to its default.
60- void reset(QObject* pSetter);
61+ void reset();
62
63 // Set the behavior to be used when setting values and translating between
64 // parameter and value space. Returns the previously set behavior (if any).
65@@ -44,10 +44,10 @@
66 // memory will leak.
67 ControlNumericBehavior* setBehavior(ControlNumericBehavior* pBehavior);
68
69- void setWidgetParameter(double dParam, QObject* pSetter);
70+ void setWidgetParameter(double dParam, QObject* pSender);
71 double getWidgetParameter() const;
72
73- void setMidiParameter(MidiOpCode opcode, double dParam);
74+ void setMidiParameter(MidiOpCode opcode, double dParam, QObject* pSender);
75 double getMidiParameter() const;
76
77 inline bool ignoreNops() const {
78@@ -63,9 +63,9 @@
79 }
80
81 signals:
82- // Emitted when the ControlDoublePrivate value changes. pSetter is a
83+ // Emitted when the ControlDoublePrivate value changes. pSender is a
84 // pointer to the setter of the value (potentially NULL).
85- void valueChanged(double value, QObject* pSetter);
86+ void valueChanged(double value, QObject* pSender);
87
88 private:
89 ConfigKey m_key;
90
91=== modified file 'mixxx/src/control/controlbehavior.cpp'
92--- mixxx/src/control/controlbehavior.cpp 2013-05-19 10:55:28 +0000
93+++ mixxx/src/control/controlbehavior.cpp 2013-06-09 22:05:30 +0000
94@@ -23,9 +23,10 @@
95 }
96
97 void ControlNumericBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,
98- ControlDoublePrivate* pControl) {
99+ ControlDoublePrivate* pControl,
100+ QObject* pSender) {
101 Q_UNUSED(o);
102- pControl->set(dParam, NULL);
103+ pControl->set(dParam, pSender);
104 }
105
106 ControlPotmeterBehavior::ControlPotmeterBehavior(double dMinValue, double dMaxValue)
107@@ -67,9 +68,10 @@
108 }
109
110 void ControlPotmeterBehavior::setValueFromMidiParameter(MidiOpCode o, double dParam,
111- ControlDoublePrivate* pControl) {
112+ ControlDoublePrivate* pControl,
113+ QObject* pSender) {
114 Q_UNUSED(o);
115- pControl->set(widgetParameterToValue(dParam), NULL);
116+ pControl->set(widgetParameterToValue(dParam), pSender);
117 }
118
119 #define maxPosition 127
120@@ -161,47 +163,51 @@
121 }
122
123 void ControlPushButtonBehavior::setValueFromMidiParameter(
124- MidiOpCode o, double dParam, ControlDoublePrivate* pControl) {
125+ MidiOpCode o, double dParam, ControlDoublePrivate* pControl, QObject* pSender) {
126 // This block makes push-buttons act as power window buttons.
127 if (m_buttonMode == POWERWINDOW && m_iNumStates == 2) {
128 if (o == MIDI_NOTE_ON) {
129 if (dParam > 0.) {
130 double value = pControl->get();
131- pControl->set(!value, NULL);
132+ pControl->set(!value, pSender);
133 m_pushTimer.setSingleShot(true);
134 m_pushTimer.start(kPowerWindowTimeMillis);
135 }
136 } else if (o == MIDI_NOTE_OFF) {
137 if (!m_pushTimer.isActive()) {
138- pControl->set(0.0, NULL);
139+ pControl->set(0.0, pSender);
140 }
141 }
142 } else if (m_buttonMode == TOGGLE) {
143 // This block makes push-buttons act as toggle buttons.
144- if (m_iNumStates > 2) { //multistate button
145- if (dParam > 0.) { //looking for NOTE_ON doesn't seem to work...
146+ if (m_iNumStates > 2) { // multistate button
147+ if (dParam > 0.) { // looking for NOTE_ON doesn't seem to work...
148+ // This is a possible race condition if an other writer wants
149+ // to change the value at the same time. We allow the race her,
150+ // because this is possible what the user expect if he controls
151+ // the same control from different devices.
152 double value = pControl->get();
153 value++;
154 if (value >= m_iNumStates) {
155- pControl->set(0, NULL);
156+ pControl->set(0, pSender);
157 } else {
158- pControl->set(value, NULL);
159+ pControl->set(value, pSender);
160 }
161 }
162 } else {
163 if (o == MIDI_NOTE_ON) {
164 if (dParam > 0.) {
165 double value = pControl->get();
166- pControl->set(!value, NULL);
167+ pControl->set(!value, pSender);
168 }
169 }
170 }
171 } else { //Not a toggle button (trigger only when button pushed)
172 if (o == MIDI_NOTE_ON) {
173 double value = pControl->get();
174- pControl->set(!value, NULL);
175+ pControl->set(!value, pSender);
176 } else if (o == MIDI_NOTE_OFF) {
177- pControl->set(0.0, NULL);
178+ pControl->set(0.0, pSender);
179 }
180 }
181 }
182
183=== modified file 'mixxx/src/control/controlbehavior.h'
184--- mixxx/src/control/controlbehavior.h 2013-05-19 10:55:28 +0000
185+++ mixxx/src/control/controlbehavior.h 2013-06-09 22:05:30 +0000
186@@ -21,7 +21,8 @@
187 virtual double widgetParameterToValue(double dParam);
188 virtual double valueToMidiParameter(double dValue);
189 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
190- ControlDoublePrivate* pControl);
191+ ControlDoublePrivate* pControl,
192+ QObject* pSender);
193 };
194
195 class ControlPotmeterBehavior : public ControlNumericBehavior {
196@@ -35,7 +36,8 @@
197 virtual double widgetParameterToValue(double dParam);
198 virtual double valueToMidiParameter(double dValue);
199 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
200- ControlDoublePrivate* pControl);
201+ ControlDoublePrivate* pControl,
202+ QObject* pSender);
203
204 protected:
205 double m_dMinValue;
206@@ -87,7 +89,8 @@
207
208 ControlPushButtonBehavior(ButtonMode buttonMode, int iNumStates);
209 virtual void setValueFromMidiParameter(MidiOpCode o, double dParam,
210- ControlDoublePrivate* pControl);
211+ ControlDoublePrivate* pControl,
212+ QObject* pSender);
213
214 private:
215 ButtonMode m_buttonMode;
216
217=== modified file 'mixxx/src/controllers/midi/midicontroller.cpp'
218--- mixxx/src/controllers/midi/midicontroller.cpp 2013-05-16 00:14:12 +0000
219+++ mixxx/src/controllers/midi/midicontroller.cpp 2013-06-09 22:05:30 +0000
220@@ -356,7 +356,7 @@
221 return;
222 }
223 }
224- p->setValueFromThread(newValue, NULL);
225+ p->set(newValue);
226 } else {
227 if (options.soft_takeover) {
228 if (m_st.ignore(p, newValue, true)) {
229
230=== modified file 'mixxx/src/controlobject.cpp'
231--- mixxx/src/controlobject.cpp 2013-05-17 16:33:04 +0000
232+++ mixxx/src/controlobject.cpp 2013-06-09 22:05:30 +0000
233@@ -64,12 +64,11 @@
234 m_sqCOHashMutex.unlock();
235 }
236
237-void ControlObject::privateValueChanged(double dValue, QObject* pSetter) {
238+// slot
239+void ControlObject::privateValueChanged(double dValue, QObject* pSender) {
240 // Only emit valueChanged() if we did not originate this change.
241- if (pSetter != this) {
242+ if (pSender != this) {
243 emit(valueChanged(dValue));
244- } else {
245- emit(valueChangedFromEngine(dValue));
246 }
247 }
248
249@@ -128,7 +127,7 @@
250
251 void ControlObject::setValueFromMidi(MidiOpCode o, double v) {
252 if (m_pControl) {
253- m_pControl->setMidiParameter(o, v);
254+ m_pControl->setMidiParameter(o, v, this);
255 }
256 }
257
258@@ -136,19 +135,13 @@
259 return m_pControl ? m_pControl->getMidiParameter() : 0.0;
260 }
261
262-void ControlObject::setValueFromThread(double dValue, QObject* pSender) {
263- if (m_pControl) {
264- m_pControl->set(dValue, pSender);
265- }
266-}
267-
268 double ControlObject::get() const {
269 return m_pControl ? m_pControl->get() : 0.0;
270 }
271
272 void ControlObject::reset() {
273 if (m_pControl) {
274- m_pControl->reset(this);
275+ m_pControl->reset();
276 }
277 }
278
279
280=== modified file 'mixxx/src/controlobject.h'
281--- mixxx/src/controlobject.h 2013-05-17 16:33:04 +0000
282+++ mixxx/src/controlobject.h 2013-06-09 22:05:30 +0000
283@@ -66,15 +66,12 @@
284
285 signals:
286 void valueChanged(double);
287- void valueChangedFromEngine(double);
288
289 public:
290 // DEPRECATED: Called to set the control value from the controller
291 // subsystem.
292 virtual void setValueFromMidi(MidiOpCode o, double v);
293 virtual double getValueToMidi() const;
294- // DEPRECATED: Called to set the control value from another thread.
295- virtual void setValueFromThread(double dValue, QObject* pSetter);
296
297 protected:
298 // Key of the object
299
300=== modified file 'mixxx/src/controlobjectthread.cpp'
301--- mixxx/src/controlobjectthread.cpp 2013-06-04 02:31:32 +0000
302+++ mixxx/src/controlobjectthread.cpp 2013-06-09 22:05:30 +0000
303@@ -70,7 +70,7 @@
304 // general valueChanged() signal even though the change originated from
305 // us. For this reason, we provide NULL here so that the change is
306 // broadcast as valueChanged() and not valueChangedByThis().
307- m_pControl->reset(NULL);
308+ m_pControl->reset();
309 }
310 }
311
312
313=== modified file 'mixxx/src/engine/bpmcontrol.cpp'
314--- mixxx/src/engine/bpmcontrol.cpp 2013-06-04 18:09:35 +0000
315+++ mixxx/src/engine/bpmcontrol.cpp 2013-06-09 22:05:30 +0000
316@@ -26,25 +26,16 @@
317 connect(m_pRateSlider, SIGNAL(valueChanged(double)),
318 this, SLOT(slotAdjustBpm()),
319 Qt::DirectConnection);
320- connect(m_pRateSlider, SIGNAL(valueChangedFromEngine(double)),
321- this, SLOT(slotAdjustBpm()),
322- Qt::DirectConnection);
323
324 m_pRateRange = ControlObject::getControl(ConfigKey(_group, "rateRange"));
325 connect(m_pRateRange, SIGNAL(valueChanged(double)),
326 this, SLOT(slotAdjustBpm()),
327 Qt::DirectConnection);
328- connect(m_pRateRange, SIGNAL(valueChangedFromEngine(double)),
329- this, SLOT(slotAdjustBpm()),
330- Qt::DirectConnection);
331
332 m_pRateDir = ControlObject::getControl(ConfigKey(_group, "rate_dir"));
333 connect(m_pRateDir, SIGNAL(valueChanged(double)),
334 this, SLOT(slotAdjustBpm()),
335 Qt::DirectConnection);
336- connect(m_pRateDir, SIGNAL(valueChangedFromEngine(double)),
337- this, SLOT(slotAdjustBpm()),
338- Qt::DirectConnection);
339
340 m_pLoopEnabled = ControlObject::getControl(
341 ConfigKey(_group, "loop_enabled"));
342
343=== modified file 'mixxx/src/engine/enginebuffer.cpp'
344--- mixxx/src/engine/enginebuffer.cpp 2013-06-09 04:01:53 +0000
345+++ mixxx/src/engine/enginebuffer.cpp 2013-06-09 22:05:30 +0000
346@@ -147,9 +147,6 @@
347 connect(m_pSlipButton, SIGNAL(valueChanged(double)),
348 this, SLOT(slotControlSlip(double)),
349 Qt::DirectConnection);
350- connect(m_pSlipButton, SIGNAL(valueChangedFromEngine(double)),
351- this, SLOT(slotControlSlip(double)),
352- Qt::DirectConnection);
353 m_pSlipPosition = new ControlObject(ConfigKey(m_group, "slip_playposition"));
354
355 // Actual rate (used in visuals, not for control)
356
357=== modified file 'mixxx/src/engine/ratecontrol.cpp'
358--- mixxx/src/engine/ratecontrol.cpp 2013-05-15 23:01:31 +0000
359+++ mixxx/src/engine/ratecontrol.cpp 2013-06-09 22:05:30 +0000
360@@ -153,9 +153,6 @@
361 connect(pVCEnabled, SIGNAL(valueChanged(double)),
362 this, SLOT(slotControlVinyl(double)),
363 Qt::DirectConnection);
364- connect(pVCEnabled, SIGNAL(valueChangedFromEngine(double)),
365- this, SLOT(slotControlVinyl(double)),
366- Qt::DirectConnection);
367
368 ControlObject* pVCScratching = ControlObject::getControl(ConfigKey(_group, "vinylcontrol_scratching"));
369 // Throw a hissy fit if somebody moved us such that the vinylcontrol_enabled
370@@ -164,9 +161,6 @@
371 connect(pVCScratching, SIGNAL(valueChanged(double)),
372 this, SLOT(slotControlVinylScratching(double)),
373 Qt::DirectConnection);
374- connect(pVCScratching, SIGNAL(valueChangedFromEngine(double)),
375- this, SLOT(slotControlVinylScratching(double)),
376- Qt::DirectConnection);
377 #endif
378 }
379
380
381=== modified file 'mixxx/src/vinylcontrol/vinylcontrolmanager.cpp'
382--- mixxx/src/vinylcontrol/vinylcontrolmanager.cpp 2013-06-08 16:58:22 +0000
383+++ mixxx/src/vinylcontrol/vinylcontrolmanager.cpp 2013-06-09 22:05:30 +0000
384@@ -52,22 +52,21 @@
385 void VinylControlManager::init() {
386 // Load saved preferences now that the objects exist
387 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_enabled"))
388- ->setValueFromThread(0, NULL);
389+ ->set(0);
390 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_enabled"))
391- ->setValueFromThread(0, NULL);
392-
393+ ->set(0);
394 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_mode"))
395- ->setValueFromThread(m_pConfig->getValueString(
396- ConfigKey(VINYL_PREF_KEY,"mode")).toDouble(), NULL);
397+ ->set(m_pConfig->getValueString(
398+ ConfigKey(VINYL_PREF_KEY,"mode")).toDouble());
399 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_mode"))
400- ->setValueFromThread(m_pConfig->getValueString(
401- ConfigKey(VINYL_PREF_KEY,"mode")).toDouble(), NULL);
402+ ->set(m_pConfig->getValueString(
403+ ConfigKey(VINYL_PREF_KEY,"mode")).toDouble());
404 ControlObject::getControl(ConfigKey("[Channel1]","vinylcontrol_cueing"))
405- ->setValueFromThread(m_pConfig->getValueString(
406- ConfigKey(VINYL_PREF_KEY,"cueing_ch1")).toDouble(), NULL);
407+ ->set(m_pConfig->getValueString(
408+ ConfigKey(VINYL_PREF_KEY,"cueing_ch1")).toDouble());
409 ControlObject::getControl(ConfigKey("[Channel2]","vinylcontrol_cueing"))
410- ->setValueFromThread(m_pConfig->getValueString(
411- ConfigKey(VINYL_PREF_KEY,"cueing_ch2")).toDouble(), NULL);
412+ ->set(m_pConfig->getValueString(
413+ ConfigKey(VINYL_PREF_KEY,"cueing_ch2")).toDouble());
414 }
415
416 void VinylControlManager::requestReloadConfig() {

Subscribers

People subscribed via source and target branches