This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21326 - Encourage x-fades or at least v-fades.
Summary: Encourage x-fades or at least v-fades.
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Adrian Bateman [MSFT]
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 23:31 UTC by Pierre Lemieux
Modified: 2013-04-08 21:19 UTC (History)
3 users (show)

See Also:


Attachments

Description Pierre Lemieux 2013-03-18 23:31:52 UTC
"3.5.9 Audio Splice Frame Algorithm" suggests adding a "silence frame" if x-fading is not available. This will lead to extremely harmful artifacts if the signal in either the track buffer or append segment contains any energy.

The specification can instead recommend v-fades, where each of the track buffer and append segment signals are independently faded to 0 around the splice point, as a simpler alternative to x-fades where overlap between the two signals is used.
Comment 1 Aaron Colwell (c) 2013-03-19 15:00:40 UTC
The case where crossfading is not supported is there to handle cases where the UA may not have access to the baseband signal such as harware decoding and or protected content. If an implementation is going to implement the v-fades you suggest it might as well just implement the crossfade since the necessary modifications to the media engine would be similar. 

At best a non-normative note could be added to this section suggesting fades to 0, but I don't expect implementations to actually do this given that this only would apply to cases where fades to zero were possible and significantly less complex to implement then the actual crossfade.
Comment 2 Pierre Lemieux 2013-04-04 19:37:40 UTC
(In reply to comment #1)

Well, implementations can always do the wrong thing :) but the specification should recommend the right thing.

In 99% of scenarios, the right thing is never to insert silence (zeroes) in an audio stream without a fade, or at the very least without waiting for the signal to cross zero.

Fades to/from zero (or waiting for a zero-crossing) are sometimes easier than cross-fade since no overlap of content is required.
Comment 3 Aaron Colwell 2013-04-08 21:19:45 UTC
Change committed.
https://dvcs.w3.org/hg/html-media/rev/f7f2b7226543

Added a note indicating that implementations may choose to apply fades to/from silence sections. I am keeping this non-normative until we have implementation experience that shows that implementing such fades is possible in a majority of cases when hardware decoders and secure decode pipelines are being used.