{"size": 738, "ext": "js", "max_stars_repo_path": "src/common/services/factories/audio-state.factory.js", "max_stars_repo_name": "overture1nfinity/instrument-tuner", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/common/services/factories/audio-state.factory.js", "max_issues_repo_name": "overture1nfinity/instrument-tuner", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/common/services/factories/audio-state.factory.js", "max_forks_repo_name": "overture1nfinity/instrument-tuner", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.4482758621, "max_line_length": 105, "alphanum_fraction": 0.4742547425}
(function() {
    'use strict';

    angular.module('common').factory('audioState', AudioStateFactory);

    
    /* istanbul ignore next */
    function AudioStateFactory(AUDIO_CFG) {
        return {
            mediaSource: {
                stream: null,
                appProcessor: null,
            },
            signal: null,
            pitch: null, // Hz
            volumePct: null,
            clipPct: null,
            clipping: null,
            pitchDelta: 0, // cents
            refPitch: {
                note: AUDIO_CFG.TONE_NAMES[0],
                noteNum: null,
                shouldInit: true, // this property will only be defined for the first update cycle / tick
            },
        };
    }
    
})();
