Skip to content

Commit 4b91f4f

Browse files
Implemented Clone Effects, though it needs an update for checking to see if the same effect is in the list twice (Causes a feedback loop)
1 parent d360ff9 commit 4b91f4f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/AbstractAudioWrapper.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ export default class AbstractAudioWrapper extends EventDispatcher{
108108
}
109109

110110
cloneEffects(){
111-
// TODO: implement.
111+
let effects = this.getEffects();
112+
let cloned = [];
113+
for(let i = 0; i < effects.length; i++){
114+
cloned.push(effects[i].clone());
115+
}
116+
return cloned;
112117
}
113118

114119
set effects(effects){
@@ -128,6 +133,8 @@ export default class AbstractAudioWrapper extends EventDispatcher{
128133
}
129134
}
130135

136+
// TODO: Check that the same effect doesn't appear in here twice (this will cause a feedback loop)
137+
131138
// Store the effects list and connect up the audio graph of the effect chain:
132139

133140
let firstEffect = effects[0];

0 commit comments

Comments
 (0)