Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2322: MediaStream must resampled to match the context sample rate #2328

Merged
merged 2 commits into from
Apr 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 18 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7915,6 +7915,11 @@ channels of the media referenced by the
<code>src</code> attribute can change the number of channels output
by this node.

If the sample rate of the {{HTMLMediaElement}} differs from the sample
rate of the associated {{AudioContext}}, then the output from the
{{HTMLMediaElement}} must be resampled to match the context's
{{BaseAudioContext/sampleRate|sample rate}}.

A {{MediaElementAudioSourceNode}} is created given an
{{HTMLMediaElement}} using the {{AudioContext}}
{{createMediaElementSource()}} method or the {{MediaElementAudioSourceOptions/mediaElement}} member of the {{MediaElementAudioSourceOptions}} dictionary for the {{MediaElementAudioSourceNode/MediaElementAudioSourceNode()|constructor}}.
Expand Down Expand Up @@ -8099,6 +8104,11 @@ the {{MediaStreamTrack}}. When the
{{MediaStreamTrack}} ends, this
{{AudioNode}} outputs one channel of silence.

If the sample rate of the {{MediaStreamTrack}} differs from the sample
rate of the associated {{AudioContext}}, then the output of the
{{MediaStreamTrack}} is resampled to match the context's
{{BaseAudioContext/sampleRate|sample rate}}.

<pre class="idl">
[Exposed=Window]
interface MediaStreamAudioSourceNode : AudioNode {
Expand Down Expand Up @@ -8204,7 +8214,12 @@ macros:
</pre>

The number of channels of the output corresponds to the number of
channels of the {{MediaStreamTrack}}.
channels of the {{MediaStreamTrackAudioSourceOptions/mediaStreamTrack}}.

If the sample rate of the {{MediaStreamTrack}} differs from the sample
rate of the associated {{AudioContext}}, then the output of the
{{MediaStreamTrackAudioSourceOptions/mediaStreamTrack}} is resampled
to match the context's {{BaseAudioContext/sampleRate|sample rate}}.

<pre class="idl">
[Exposed=Window]
Expand Down Expand Up @@ -12676,7 +12691,8 @@ Change Log</h2>
<h3 id="changes-2021-01-14">
Since Candidate Recommendation of 14 January 2021
</h3>
<!-- Last updated: 2021-04-29 -->
<!-- Last updated: 2021-04-30 -->
* <a href="https://github.com/WebAudio/web-audio-api/pull/2328">PR 2328</a>: MediaStream must be resampled to match the context sample rate
* <a href="https://github.com/WebAudio/web-audio-api/pull/2318">PR 2318</a>: Restore empty of pending processor construction data after successful initialization of AudioWorkProcessor#port.
* <a href="https://github.com/WebAudio/web-audio-api/pull/2317">PR 2317</a>: Standardize h3/h4 interface and dictionary markup
* <a href="https://github.com/WebAudio/web-audio-api/pull/2312">PR 2312</a>: Rework description of control thread state and rendering thread state
Expand Down