updated ops for the new microphone dropdown names

pull/89/head
jmoenig 2019-03-18 15:36:51 +01:00
rodzic 71f7003529
commit cf7fb8f64e
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -2254,20 +2254,20 @@ Process.prototype.doStopAllSounds = function () {
Process.prototype.reportAudio = function (choice) { Process.prototype.reportAudio = function (choice) {
var stage = this.blockReceiver().parentThatIsA(StageMorph), var stage = this.blockReceiver().parentThatIsA(StageMorph),
selection = this.inputOption(choice); selection = this.inputOption(choice);
if (selection === 'bins') { if (selection === 'resolution') {
return stage.microphone.binSize(); return stage.microphone.binSize();
} }
if (stage.microphone.isOn()) { if (stage.microphone.isOn()) {
switch (selection) { switch (selection) {
case 'volume': case 'volume':
return stage.microphone.volume * 100; return stage.microphone.volume * 100;
case 'pitch': case 'frequency':
return stage.microphone.pitch; return stage.microphone.pitch;
case 'note': case 'note':
return stage.microphone.note; return stage.microphone.note;
case 'signals': case 'samples':
return new List(stage.microphone.signals); return new List(stage.microphone.signals);
case 'frequencies': case 'spectrum':
return new List(stage.microphone.frequencies); return new List(stage.microphone.frequencies);
default: default:
return null; return null;