質問するログイン新規登録

回答編集履歴

2

getUserMedia の引数を追加

2017/07/12 20:46

投稿

Korilakkuma
Korilakkuma

スコア29

answer CHANGED
@@ -4,7 +4,7 @@
4
4
  const context = new AudioContext();
5
5
  const processor = context.createScriptProcessor(1024, 2, 2);
6
6
 
7
- navigator.mediaDevices.getUserMedia().then((stream) => {
7
+ navigator.mediaDevices.getUserMedia({ audio : true }).then((stream) => {
8
8
  const mediaStream = context.createMediaStreamSource(stream);
9
9
 
10
10
  mediaStream.connect(processor);

1

} の忘れ

2017/07/12 20:46

投稿

Korilakkuma
Korilakkuma

スコア29

answer CHANGED
@@ -22,6 +22,7 @@
22
22
 
23
23
  outputLs[i] = outputL; // ピッチシフターが適用された音声データ
24
24
  outputRs[i] = outputR; // ピッチシフターが適用された音声データ
25
+ }
25
26
  };
26
27
  }).catch((error) => {
27
28
  console.error(error);