pxt-microbit 5.1.7 → 5.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/sim.d.ts CHANGED
@@ -560,6 +560,17 @@ declare namespace pxsim.music.MusicalProgressions {
560
560
  */
561
561
  function calculateFrequencyFromProgression(root: number, progression: Progression, offset: number): number;
562
562
  }
563
+ declare namespace pxsim.record {
564
+ function record(): Promise<void>;
565
+ function play(): void;
566
+ function stop(): void;
567
+ function erase(): void;
568
+ function setMicrophoneGain(gain: number): void;
569
+ function audioDuration(sampleRate: number): number;
570
+ function audioIsPlaying(): boolean;
571
+ function audioIsRecording(): boolean;
572
+ function audioIsStopped(): boolean;
573
+ }
563
574
  declare namespace pxsim {
564
575
  class SerialState {
565
576
  private readonly runtime;
package/built/sim.js CHANGED
@@ -2273,6 +2273,45 @@ var pxsim;
2273
2273
  })(music = pxsim.music || (pxsim.music = {}));
2274
2274
  })(pxsim || (pxsim = {}));
2275
2275
  var pxsim;
2276
+ (function (pxsim) {
2277
+ var record;
2278
+ (function (record_1) {
2279
+ async function record() {
2280
+ //request permission is asynchronous
2281
+ pxsim.board();
2282
+ }
2283
+ record_1.record = record;
2284
+ function play() {
2285
+ }
2286
+ record_1.play = play;
2287
+ function stop() {
2288
+ }
2289
+ record_1.stop = stop;
2290
+ function erase() {
2291
+ }
2292
+ record_1.erase = erase;
2293
+ function setMicrophoneGain(gain) {
2294
+ }
2295
+ record_1.setMicrophoneGain = setMicrophoneGain;
2296
+ function audioDuration(sampleRate) {
2297
+ return 0;
2298
+ }
2299
+ record_1.audioDuration = audioDuration;
2300
+ function audioIsPlaying() {
2301
+ return false;
2302
+ }
2303
+ record_1.audioIsPlaying = audioIsPlaying;
2304
+ function audioIsRecording() {
2305
+ return false;
2306
+ }
2307
+ record_1.audioIsRecording = audioIsRecording;
2308
+ function audioIsStopped() {
2309
+ return false;
2310
+ }
2311
+ record_1.audioIsStopped = audioIsStopped;
2312
+ })(record = pxsim.record || (pxsim.record = {}));
2313
+ })(pxsim || (pxsim = {}));
2314
+ var pxsim;
2276
2315
  (function (pxsim) {
2277
2316
  const SERIAL_BUFFER_LENGTH = 16;
2278
2317
  class SerialState {
@@ -1 +1 @@
1
- {"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","A micro-servo library":"A micro-servo library","Adds new blocks for message communication in the radio category":"Adds new blocks for message communication in the radio category","BETA - Camera, remote control and other Bluetooth services. App required.":"BETA - Camera, remote control and other Bluetooth services. App required.","Behind the MakeCode Hardware":"Behind the MakeCode Hardware","Blocks to JavaScript":"Blocks to JavaScript","Bluetooth services":"Bluetooth services","Buy":"Buy","Can't import microbit.co.uk scripts...":"Can't import microbit.co.uk scripts...","Coding Cards":"Coding Cards","Coding for Teachers":"Coding for Teachers","Color manipulation":"Color manipulation","Courses":"Courses","Data logging to flash memory. micro:bit (V2) only.":"Data logging to flash memory. micro:bit (V2) only.","Data logging to flash.":"Data logging to flash.","Deep Dive":"Deep Dive","Disable Bluetooth Event Service":"Disable Bluetooth Event Service","Download cancelled":"Download cancelled","Download failed, please try again":"Download failed, please try again","Download for V2 only":"Download for V2 only","Fashion":"Fashion","Games":"Games","Go Back":"Go Back","Go to the old editor":"Go to the old editor","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.","Hardware":"Hardware","Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.":"Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.","Jacdac":"Jacdac","JustWorks pairing (default): Pairing is automatic once the pairing is initiated.":"JustWorks pairing (default): Pairing is automatic once the pairing is initiated.","Live Coding":"Live Coding","MicroCode for the new micro:bit (V2)":"MicroCode for the new micro:bit (V2)","Microsoft MakeCode for micro:bit":"Microsoft MakeCode for micro:bit","Music":"Music","New? Start here!":"New? Start here!","No Pairing Required: Anyone can connect via Bluetooth.":"No Pairing Required: Anyone can connect via Bluetooth.","Oops, there was a problem downloading your code":"Oops, there was a problem downloading your code","Passkey pairing: Pairing requires 6 digit key to pair.":"Passkey pairing: Pairing requires 6 digit key to pair.","Radio Games":"Radio Games","Reference":"Reference","Science":"Science","Science Experiments":"Science Experiments","Settings storage in internal flash":"Settings storage in internal flash","Support":"Support","The microbit core library":"The microbit core library","The microphone library":"The microphone library","The radio services":"The radio services","Tools":"Tools","Toys":"Toys","Turtle":"Turtle","Tutorials":"Tutorials","Tutorials for the new micro:bit (V2)":"Tutorials for the new micro:bit (V2)","makecode.microbit.org":"makecode.microbit.org","{id:type}Image":"Image","{id:type}LedSprite":"LedSprite","{id:var}image":"image","{id:var}sprite":"sprite"}
1
+ {"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","A micro-servo library":"A micro-servo library","Adds new blocks for message communication in the radio category":"Adds new blocks for message communication in the radio category","BETA - Camera, remote control and other Bluetooth services. App required.":"BETA - Camera, remote control and other Bluetooth services. App required.","Behind the MakeCode Hardware":"Behind the MakeCode Hardware","Blocks to JavaScript":"Blocks to JavaScript","Bluetooth services":"Bluetooth services","Buy":"Buy","Can't import microbit.co.uk scripts...":"Can't import microbit.co.uk scripts...","Coding Cards":"Coding Cards","Coding for Teachers":"Coding for Teachers","Color manipulation":"Color manipulation","Courses":"Courses","Data logging to flash memory. micro:bit (V2) only.":"Data logging to flash memory. micro:bit (V2) only.","Data logging to flash.":"Data logging to flash.","Deep Dive":"Deep Dive","Disable Bluetooth Event Service":"Disable Bluetooth Event Service","Download cancelled":"Download cancelled","Download failed, please try again":"Download failed, please try again","Download for V2 only":"Download for V2 only","Fashion":"Fashion","Games":"Games","Go Back":"Go Back","Go to the old editor":"Go to the old editor","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.","Hardware":"Hardware","Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.":"Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.","Jacdac":"Jacdac","JustWorks pairing (default): Pairing is automatic once the pairing is initiated.":"JustWorks pairing (default): Pairing is automatic once the pairing is initiated.","Live Coding":"Live Coding","MicroCode for the new micro:bit (V2)":"MicroCode for the new micro:bit (V2)","Microsoft MakeCode for micro:bit":"Microsoft MakeCode for micro:bit","Music":"Music","New? Start here!":"New? Start here!","No Pairing Required: Anyone can connect via Bluetooth.":"No Pairing Required: Anyone can connect via Bluetooth.","Oops, there was a problem downloading your code":"Oops, there was a problem downloading your code","Passkey pairing: Pairing requires 6 digit key to pair.":"Passkey pairing: Pairing requires 6 digit key to pair.","Radio Games":"Radio Games","Record sound clips. micro:bit (V2) only":"Record sound clips. micro:bit (V2) only","Reference":"Reference","Science":"Science","Science Experiments":"Science Experiments","Settings storage in internal flash":"Settings storage in internal flash","Support":"Support","The microbit core library":"The microbit core library","The microphone library":"The microphone library","The radio services":"The radio services","Tools":"Tools","Toys":"Toys","Turtle":"Turtle","Tutorials":"Tutorials","Tutorials for the new micro:bit (V2)":"Tutorials for the new micro:bit (V2)","makecode.microbit.org":"makecode.microbit.org","{id:type}Image":"Image","{id:type}LedSprite":"LedSprite","{id:var}image":"image","{id:var}sprite":"sprite"}