src/virtual-machine.js
/**
     * Duplicate the sound at the given index. Add it at that index + 1.
     * @param {!int} soundIndex Index of sound to duplicate
     * @returns {?Promise} - a promise that resolves when the sound has been decoded and added
     */
Duplicate the sound at the given index. Add it at that index + 1.
@param {!int} soundIndex Index of sound to duplicate
@returns {?Promise} - a promise that resolves when the sound has been decoded and added
Duplicate the sound at the given index . Add it at that index + 1 . @param { !int } soundIndex Index of sound to duplicate @returns { ?Promise } - a promise that resolves when the sound has been decoded and added
duplicateSound (soundIndex) {
        const originalSound = this.editingTarget.getSounds()[soundIndex];
        const clone = Object.assign({}, originalSound);
        return loadSound(clone, this.runtime).then(() => {
            this.editingTarget.addSound(clone, soundIndex + 1);
            this.emitTargetsUpdate();
        });
    }
duplicateSound ( soundIndex ) { const originalSound = this . editingTarget . getSounds ( ) [ soundIndex ] ; const clone = Object . assign ( { } , originalSound ) ; return loadSound ( clone , this . runtime ) . then ( ( ) => { this . editingTarget . addSound ( clone , soundIndex + 1 ) ; this . emitTargetsUpdate ( ) ; } ) ; }
Duplicate the sound at the given index.
Duplicate the sound at the given index .