c5cec3a6ba
* bump pxt * fix build issues * Auto-gen of projects/summary * removing feild editors moved to pxt * various typing fixes * more typing fixes * fixing various typing issues * Start on integration of new pxt * serial number fixes * gc-ify MMap object * Re-build generated files * fix console listeners * clear lf() warnings * More generated files * also auto-generated * Compilation fixes * fix merge * mostly fixing blocks * fix sim * fix field motors * enable a few features * moving to tsx * try to fix edtiro compilation * more defs * removing commands * removing extra $ * fix blockly warning * hiding images * enabling more pxt features * hide images * setup autorun * add lock on target_reset * update deps * return trylock result * updated pxt * rename video section * add alpha channel * upgraded pxt * bump pxt/version * removed alpha ref * var ceanup * don't do major bump
29 lines
502 B
TypeScript
29 lines
502 B
TypeScript
|
|
namespace pxsim.music {
|
|
export function fromWAV(buf: RefBuffer) {
|
|
return buf
|
|
}
|
|
|
|
export function stopAllSounds() {
|
|
SoundMethods.stop()
|
|
}
|
|
}
|
|
|
|
namespace pxsim.SoundMethods {
|
|
let audio: HTMLAudioElement;
|
|
|
|
export function buffer(buf: RefBuffer) {
|
|
return buf
|
|
}
|
|
|
|
export function play(buf: RefBuffer) {
|
|
return pxsim.AudioContextManager.playBufferAsync(buf);
|
|
}
|
|
|
|
export function stop() {
|
|
pxsim.AudioContextManager.stop();
|
|
}
|
|
|
|
}
|
|
|