This page was translated from English by the community. Learn more and join the MDN Web Docs community.
AudioNode.channelInterpretation
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
AudioNode 인터페이스의 channelInterpretation 프로퍼티는 입력/출력 채널의 수가 다를 때 입력 채널이 출력 채널에 매핑되는 방법을 기술하는 열거형 값을 나타냅니다. 예를 들어, 이 설정은 모노 입력이 어떻게 스테레오 또는 5.1 채널 출력으로 업믹스될 것인지를 정의하거나, 어떻게 쿼드 채널 입력이 스테레오 또는 모노 출력으로 다운믹스될 것인지를 정의합니다.
이 프로퍼티에는 두 가지 옵션이 있습니다. speakers 와 discrete 입니다. 이 옵션들은 Web Audio API의 기본 개념 > 업믹싱과 다운믹싱에 기록되어 있습니다.
구문
js
var oscillator = audioCtx.createOscillator();
oscillator.channelInterpretation = "discrete";
값
이 값들은 Web Audio API의 기본 개념 > 업믹싱과 다운믹싱에 기록되어 있습니다.
요약하자면,
예제
js
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
var oscillator = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
oscillator.channelInterpretation = "discrete";
명세서
| Specification |
|---|
| Web Audio API> # dom-audionode-channelinterpretation> |
브라우저 호환성
Enable JavaScript to view this browser compatibility table.