mwg API
    Preparing search index...

    Function playTone

    • Synthesizes a tone and plays it once, fire-and-forget - the runtime counterpart to Sound.play, generating instead of loading. create is injectable the same way Sound/Music already are, so a test never needs a real Audio element.

      Parameters

      Returns Playable

      import { playTone } from '@datamoc/mw_games/audio';

      playTone({ waveform: 'sine', frequency: 660, duration: 0.08 }); // a quick UI blip