How to use scratch-audio - 4 common examples

To help you get started, we’ve selected a few scratch-audio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LLK / scratch-gui / src / containers / gui.jsx View on Github external
componentDidMount () {
        this.audioEngine = new AudioEngine();
        this.props.vm.attachAudioEngine(this.audioEngine);
        this.props.vm.loadProject(this.props.projectData)
            .then(() => {
                this.setState({loading: false}, () => {
                    this.props.vm.setCompatibilityMode(true);
                    this.props.vm.start();
                });
            })
            .catch(e => {
                // Need to catch this error and update component state so that
                // error page gets rendered if project failed to load
                this.setState({loadingError: true, errorMessage: e});
            });
    }
    componentWillReceiveProps (nextProps) {
github LLK / scratch-gui / src / containers / gui.jsx View on Github external
componentDidMount () {
        this.audioEngine = new AudioEngine();
        this.props.vm.attachAudioEngine(this.audioEngine);
        this.props.vm.loadProject(this.props.projectData).then(() => {
            this.setState({loading: false}, () => {
                this.props.vm.setCompatibilityMode(true);
                this.props.vm.start();
            });
        });
    }
    componentWillReceiveProps (nextProps) {
github LLK / scratch-gui / src / lib / vm-manager-hoc.jsx View on Github external
componentDidMount () {
            if (this.props.vm.initialized) return;
            this.audioEngine = new AudioEngine();
            this.props.vm.attachAudioEngine(this.audioEngine);
            this.props.vm.setCompatibilityMode(true);
            this.props.vm.start();
            this.props.vm.initialized = true;
        }
        componentDidUpdate (prevProps) {
github LLK / scratch-gui / src / containers / sound-library.jsx View on Github external
componentDidMount () {
        this.audioEngine = new AudioEngine();
        this.playingSoundPromise = null;
    }
    componentWillUnmount () {

scratch-audio

audio engine for scratch 3.0

BSD-3-Clause
Latest version published 5 days ago

Package Health Score

81 / 100
Full package analysis

Popular scratch-audio functions

Similar packages