Skip to content

Commit 2fe5812

Browse files
committed
- Always reset the target bus when copying or moving an Aux-Send
insert into an audio output bus.
1 parent 500a7b4 commit 2fe5812

13 files changed

+164
-119
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ChangeLog
66

77
GIT HEAD
88

9+
- Reset target bus when copying or moving audio aux-sends inserts
10+
into audio output buses.
11+
912
- Mixer: fixed dangling track removal after one of its buses has
1013
been previously deleted."
1114

src/qtractorPlugin.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include "qtractorAudioEngine.h"
3030
#include "qtractorMidiManager.h"
3131

32+
#include "qtractorInsertPlugin.h"
33+
3234
#include "qtractorMainForm.h"
3335
#include "qtractorOptions.h"
3436

@@ -2175,8 +2177,21 @@ qtractorPlugin *qtractorPluginList::copyPlugin ( qtractorPlugin *pPlugin )
21752177
if (pNewPlugin) {
21762178
pNewPlugin->setAlias(pPlugin->alias());
21772179
pNewPlugin->setPreset(pPlugin->preset());
2178-
pNewPlugin->setConfigs(pPlugin->configs());
2179-
pNewPlugin->setConfigTypes(pPlugin->configTypes());
2180+
// Special case for audio Aux-sends copied into output buses...
2181+
if ((flags() & qtractorPluginList::AudioOutBus) &&
2182+
(pType->typeHint() == qtractorPluginType::AuxSend) &&
2183+
(pType->index() > 0)) { // index == channels > 0 => Audio aux-send.
2184+
qtractorAudioAuxSendPlugin *pAudioAuxSendPlugin
2185+
= static_cast<qtractorAudioAuxSendPlugin *> (pNewPlugin);
2186+
if (pAudioAuxSendPlugin) {
2187+
pAudioAuxSendPlugin->setAudioBusName(QString());
2188+
pAudioAuxSendPlugin->freezeConfigs();
2189+
}
2190+
} else {
2191+
// All other cases, proceed as usual...
2192+
pNewPlugin->setConfigs(pPlugin->configs());
2193+
pNewPlugin->setConfigTypes(pPlugin->configTypes());
2194+
}
21802195
pNewPlugin->setValues(pPlugin->values());
21812196
pNewPlugin->realizeConfigs();
21822197
pNewPlugin->realizeValues();

src/qtractorPluginCommand.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,18 @@ qtractorMovePluginCommand::qtractorMovePluginCommand (
349349
pPlugin, pNextPlugin)
350350
{
351351
m_pPluginList = pPluginList;
352+
353+
// Special case for audio Aux-sends moved into output buses...
354+
qtractorPluginType *pType = pPlugin->type();
355+
if (pType && (pType->typeHint() == qtractorPluginType::AuxSend) &&
356+
(pPluginList->flags() & qtractorPluginList::AudioOutBus) &&
357+
(pType->index() > 0)) { // index == channels > 0 => Audio aux-send.
358+
m_pAudioAuxSendPlugin = static_cast<qtractorAudioAuxSendPlugin *> (pPlugin);
359+
if (m_pAudioAuxSendPlugin)
360+
m_sAudioAuxSendBusName = m_pAudioAuxSendPlugin->audioBusName();
361+
} else {
362+
m_pAudioAuxSendPlugin = nullptr;
363+
}
352364
}
353365

354366

@@ -375,6 +387,16 @@ bool qtractorMovePluginCommand::redo (void)
375387
// Move it...
376388
m_pPluginList->movePlugin(pPlugin, nextPlugin());
377389

390+
// Special case for audio Aux-sends moved into output buses...
391+
if (m_pAudioAuxSendPlugin) {
392+
const QString& sAudioAuxSendBusName
393+
= m_pAudioAuxSendPlugin->audioBusName();
394+
if (sAudioAuxSendBusName.isEmpty())
395+
m_pAudioAuxSendPlugin->setAudioBusName(m_sAudioAuxSendBusName);
396+
else
397+
m_pAudioAuxSendPlugin->setAudioBusName(QString());
398+
}
399+
378400
// Swap it nice, finally.
379401
m_pPluginList = pPluginList;
380402
setNextPlugin(pNextPlugin);

src/qtractorPluginCommand.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
// Forward declarations...
3333
class qtractorAuxSendPlugin;
34+
class qtractorAudioAuxSendPlugin;
3435
class qtractorPluginPortWidget;
3536
class qtractorMidiManager;
3637

@@ -213,6 +214,10 @@ class qtractorMovePluginCommand : public qtractorInsertPluginCommand
213214

214215
// Instance variables.
215216
qtractorPluginList *m_pPluginList;
217+
218+
// Special case for audio Aux-sends moved into output buses...
219+
qtractorAudioAuxSendPlugin *m_pAudioAuxSendPlugin;
220+
QString m_sAudioAuxSendBusName;
216221
};
217222

218223

src/translations/qtractor_cs.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,22 @@ MIDI: </translation>
280280
<translation>SMF Format 1</translation>
281281
</message>
282282
<message>
283-
<location filename="../qtractorPlugin.cpp" line="237"/>
283+
<location filename="../qtractorPlugin.cpp" line="239"/>
284284
<source>(Any)</source>
285285
<translation>(Jakýkoli)</translation>
286286
</message>
287287
<message>
288-
<location filename="../qtractorPlugin.cpp" line="267"/>
288+
<location filename="../qtractorPlugin.cpp" line="269"/>
289289
<source>Activate</source>
290290
<translation>Zapnout</translation>
291291
</message>
292292
<message>
293-
<location filename="../qtractorPlugin.cpp" line="570"/>
293+
<location filename="../qtractorPlugin.cpp" line="572"/>
294294
<source>Aux Send: %1</source>
295295
<translation>Aux Send: %1</translation>
296296
</message>
297297
<message>
298-
<location filename="../qtractorPlugin.cpp" line="2398"/>
298+
<location filename="../qtractorPlugin.cpp" line="2413"/>
299299
<source>%1(%2): %3 plugin not found.</source>
300300
<translation>%1(%2): %3 přídavný modul nenalezen.</translation>
301301
</message>
@@ -330,42 +330,42 @@ MIDI: </translation>
330330
<translation>Přesunout přídavný modul</translation>
331331
</message>
332332
<message>
333-
<location filename="../qtractorPluginCommand.cpp" line="411"/>
333+
<location filename="../qtractorPluginCommand.cpp" line="433"/>
334334
<source>activate plugin</source>
335335
<translation>Zapnout přídavný modul</translation>
336336
</message>
337337
<message>
338-
<location filename="../qtractorPluginCommand.cpp" line="447"/>
338+
<location filename="../qtractorPluginCommand.cpp" line="469"/>
339339
<source>preset plugin</source>
340340
<translation>Přednastavit přídavný modul</translation>
341341
</message>
342342
<message>
343-
<location filename="../qtractorPluginCommand.cpp" line="494"/>
343+
<location filename="../qtractorPluginCommand.cpp" line="516"/>
344344
<source>reset plugin</source>
345345
<translation>Znovu spustit přídavný modul</translation>
346346
</message>
347347
<message>
348-
<location filename="../qtractorPluginCommand.cpp" line="544"/>
348+
<location filename="../qtractorPluginCommand.cpp" line="566"/>
349349
<source>plugin program</source>
350350
<translation>Program přídavného modulu</translation>
351351
</message>
352352
<message>
353-
<location filename="../qtractorPluginCommand.cpp" line="590"/>
353+
<location filename="../qtractorPluginCommand.cpp" line="612"/>
354354
<source>plugin alias</source>
355355
<translation>Přezdívka přídavného modulu</translation>
356356
</message>
357357
<message>
358-
<location filename="../qtractorPluginCommand.cpp" line="832"/>
358+
<location filename="../qtractorPluginCommand.cpp" line="854"/>
359359
<source>dedicated audio outputs</source>
360360
<translation>Jednoúčelové zvukové výstupy</translation>
361361
</message>
362362
<message>
363-
<location filename="../qtractorPluginCommand.cpp" line="877"/>
363+
<location filename="../qtractorPluginCommand.cpp" line="899"/>
364364
<source>direct access param</source>
365365
<translation>Parametr pro přímý přístup</translation>
366366
</message>
367367
<message>
368-
<location filename="../qtractorPluginCommand.cpp" line="909"/>
368+
<location filename="../qtractorPluginCommand.cpp" line="931"/>
369369
<source>import plugins</source>
370370
<translation>Přídavné moduly k zavedení</translation>
371371
</message>
@@ -545,7 +545,7 @@ Stopa: &quot;%1&quot; Vstup: &quot;%2&quot; Výstup: &quot;%3&quot;</translation
545545
</message>
546546
<message>
547547
<location filename="../qtractorMidiTimer.cpp" line="66"/>
548-
<location filename="../qtractorPlugin.cpp" line="246"/>
548+
<location filename="../qtractorPlugin.cpp" line="248"/>
549549
<source>(default)</source>
550550
<translation>(výchozí)</translation>
551551
</message>

src/translations/qtractor_de.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ MIDI: </translation>
393393
</message>
394394
<message>
395395
<location filename="../qtractorMidiTimer.cpp" line="66"/>
396-
<location filename="../qtractorPlugin.cpp" line="246"/>
396+
<location filename="../qtractorPlugin.cpp" line="248"/>
397397
<source>(default)</source>
398398
<translation>(voreingestellt)</translation>
399399
</message>
@@ -490,22 +490,22 @@ MIDI: </translation>
490490
<translation type="unfinished"></translation>
491491
</message>
492492
<message>
493-
<location filename="../qtractorPlugin.cpp" line="237"/>
493+
<location filename="../qtractorPlugin.cpp" line="239"/>
494494
<source>(Any)</source>
495495
<translation>(Jedes)</translation>
496496
</message>
497497
<message>
498-
<location filename="../qtractorPlugin.cpp" line="267"/>
498+
<location filename="../qtractorPlugin.cpp" line="269"/>
499499
<source>Activate</source>
500500
<translation>Aktivieren</translation>
501501
</message>
502502
<message>
503-
<location filename="../qtractorPlugin.cpp" line="570"/>
503+
<location filename="../qtractorPlugin.cpp" line="572"/>
504504
<source>Aux Send: %1</source>
505505
<translation type="unfinished"></translation>
506506
</message>
507507
<message>
508-
<location filename="../qtractorPlugin.cpp" line="2398"/>
508+
<location filename="../qtractorPlugin.cpp" line="2413"/>
509509
<source>%1(%2): %3 plugin not found.</source>
510510
<translation>%1(%2): %3 PlugIn nicht gefunden.</translation>
511511
</message>
@@ -540,42 +540,42 @@ MIDI: </translation>
540540
<translation>PlugIn verschieben</translation>
541541
</message>
542542
<message>
543-
<location filename="../qtractorPluginCommand.cpp" line="411"/>
543+
<location filename="../qtractorPluginCommand.cpp" line="433"/>
544544
<source>activate plugin</source>
545545
<translation>PlugIn aktivieren</translation>
546546
</message>
547547
<message>
548-
<location filename="../qtractorPluginCommand.cpp" line="447"/>
548+
<location filename="../qtractorPluginCommand.cpp" line="469"/>
549549
<source>preset plugin</source>
550550
<translation></translation>
551551
</message>
552552
<message>
553-
<location filename="../qtractorPluginCommand.cpp" line="494"/>
553+
<location filename="../qtractorPluginCommand.cpp" line="516"/>
554554
<source>reset plugin</source>
555555
<translation>PlugIn zurücksetzen</translation>
556556
</message>
557557
<message>
558-
<location filename="../qtractorPluginCommand.cpp" line="544"/>
558+
<location filename="../qtractorPluginCommand.cpp" line="566"/>
559559
<source>plugin program</source>
560560
<translation type="unfinished"></translation>
561561
</message>
562562
<message>
563-
<location filename="../qtractorPluginCommand.cpp" line="590"/>
563+
<location filename="../qtractorPluginCommand.cpp" line="612"/>
564564
<source>plugin alias</source>
565565
<translation type="unfinished"></translation>
566566
</message>
567567
<message>
568-
<location filename="../qtractorPluginCommand.cpp" line="832"/>
568+
<location filename="../qtractorPluginCommand.cpp" line="854"/>
569569
<source>dedicated audio outputs</source>
570570
<translation>Festgelegte Audioausgänge</translation>
571571
</message>
572572
<message>
573-
<location filename="../qtractorPluginCommand.cpp" line="877"/>
573+
<location filename="../qtractorPluginCommand.cpp" line="899"/>
574574
<source>direct access param</source>
575575
<translation type="unfinished"></translation>
576576
</message>
577577
<message>
578-
<location filename="../qtractorPluginCommand.cpp" line="909"/>
578+
<location filename="../qtractorPluginCommand.cpp" line="931"/>
579579
<source>import plugins</source>
580580
<translation type="unfinished"></translation>
581581
</message>

src/translations/qtractor_es.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ MIDI: </translation>
477477
</message>
478478
<message>
479479
<location filename="../qtractorMidiTimer.cpp" line="66"/>
480-
<location filename="../qtractorPlugin.cpp" line="246"/>
480+
<location filename="../qtractorPlugin.cpp" line="248"/>
481481
<source>(default)</source>
482482
<translation>(default)</translation>
483483
</message>
@@ -574,22 +574,22 @@ MIDI: </translation>
574574
<translation>SMF Formato 1</translation>
575575
</message>
576576
<message>
577-
<location filename="../qtractorPlugin.cpp" line="237"/>
577+
<location filename="../qtractorPlugin.cpp" line="239"/>
578578
<source>(Any)</source>
579579
<translation>(Cualquiera)</translation>
580580
</message>
581581
<message>
582-
<location filename="../qtractorPlugin.cpp" line="267"/>
582+
<location filename="../qtractorPlugin.cpp" line="269"/>
583583
<source>Activate</source>
584584
<translation>Activar</translation>
585585
</message>
586586
<message>
587-
<location filename="../qtractorPlugin.cpp" line="570"/>
587+
<location filename="../qtractorPlugin.cpp" line="572"/>
588588
<source>Aux Send: %1</source>
589589
<translation type="unfinished"></translation>
590590
</message>
591591
<message>
592-
<location filename="../qtractorPlugin.cpp" line="2398"/>
592+
<location filename="../qtractorPlugin.cpp" line="2413"/>
593593
<source>%1(%2): %3 plugin not found.</source>
594594
<translation>%1(%2): %3 plugin no encontrado.</translation>
595595
</message>
@@ -624,42 +624,42 @@ MIDI: </translation>
624624
<translation>mover plugin</translation>
625625
</message>
626626
<message>
627-
<location filename="../qtractorPluginCommand.cpp" line="411"/>
627+
<location filename="../qtractorPluginCommand.cpp" line="433"/>
628628
<source>activate plugin</source>
629629
<translation>activar plugin</translation>
630630
</message>
631631
<message>
632-
<location filename="../qtractorPluginCommand.cpp" line="447"/>
632+
<location filename="../qtractorPluginCommand.cpp" line="469"/>
633633
<source>preset plugin</source>
634634
<translation>plugin preestablecido</translation>
635635
</message>
636636
<message>
637-
<location filename="../qtractorPluginCommand.cpp" line="494"/>
637+
<location filename="../qtractorPluginCommand.cpp" line="516"/>
638638
<source>reset plugin</source>
639639
<translation>reiniciar plugin</translation>
640640
</message>
641641
<message>
642-
<location filename="../qtractorPluginCommand.cpp" line="544"/>
642+
<location filename="../qtractorPluginCommand.cpp" line="566"/>
643643
<source>plugin program</source>
644644
<translation>programar plugin</translation>
645645
</message>
646646
<message>
647-
<location filename="../qtractorPluginCommand.cpp" line="590"/>
647+
<location filename="../qtractorPluginCommand.cpp" line="612"/>
648648
<source>plugin alias</source>
649649
<translation type="unfinished"></translation>
650650
</message>
651651
<message>
652-
<location filename="../qtractorPluginCommand.cpp" line="832"/>
652+
<location filename="../qtractorPluginCommand.cpp" line="854"/>
653653
<source>dedicated audio outputs</source>
654654
<translation>salidas de audio dedicadas</translation>
655655
</message>
656656
<message>
657-
<location filename="../qtractorPluginCommand.cpp" line="877"/>
657+
<location filename="../qtractorPluginCommand.cpp" line="899"/>
658658
<source>direct access param</source>
659659
<translation>parámetro de acceso directo</translation>
660660
</message>
661661
<message>
662-
<location filename="../qtractorPluginCommand.cpp" line="909"/>
662+
<location filename="../qtractorPluginCommand.cpp" line="931"/>
663663
<source>import plugins</source>
664664
<translation>importar plugins</translation>
665665
</message>

0 commit comments

Comments
 (0)