diff --git a/samples/js/demos/html/webaudio-and-webrtc.html b/samples/js/demos/html/webaudio-and-webrtc.html new file mode 100644 index 000000000..173a30845 --- /dev/null +++ b/samples/js/demos/html/webaudio-and-webrtc.html @@ -0,0 +1,254 @@ + + + + +Audio effects with WebAudio in WebRTC + + + + + +

Capture microphone input and stream it out to a peer with a processing + effect applied to the audio.

+

The audio stream is:

+ o Recorded using live-audio + input.
+ o Filtered using an HP filter with fc=1500 Hz.
+ o Encoded using + Opus.
+ o Transmitted (in loopback) to remote peer using + RTCPeerConnection where it is decoded.
+ o Finally, the received remote stream is used as source to an <audio> + tag and played out locally.
+
Press any key to add an effect to the transmitted audio while talking. +

+

Please note that:

+ o Linux is currently not supported.
+ o Sample rate and channel configuration must be the same for input and + output sides on Windows.
+ o Only the Default microphone device can be used for capturing. +

+

For more information, see + WebRTC integration with the Web Audio API. +

+ +

+ +

+ Add local audio to output:

+

+
+
diff --git a/samples/js/demos/sounds/Shamisen-C4.wav b/samples/js/demos/sounds/Shamisen-C4.wav
new file mode 100644
index 000000000..2f9075633
Binary files /dev/null and b/samples/js/demos/sounds/Shamisen-C4.wav differ