Bug 143332

Summary: [Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when the list of enabled audio tracks change.
Product: WebKit Reporter: isaacshinman
Component: Web AudioAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, crogers, eric.carlson, jer.noble, jonlee, mail
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.10   
Attachments:
Description Flags
Patch none

isaacshinman
Reported 2015-04-02 03:30:37 PDT
I am in the process of developing an HTML5 canvas interactive piece that uses Createjs and the Web Audio API. I've managed to get audio working in Chrome/Firefox/Safari despite the deprecation of webkitAudioContext by Chrome and FF but not Safari. However, filters for some reason are not working in Safari, but sound still plays. Filters DO work in Chrome/FF. I have my filters set up like this: var sound = new Audio(); sound.src = './sounds/sound.mp3'; sound.autoplay = false; sound.loop = true; soundSource = context.createMediaElementSource(sound); var soundFilter = context.createBiquadFilter(); soundFilter.type = "lowpass"; soundFilter.frequency.value = 500; soundSource.connect(soundFilter); soundFilter.connect(context.destination); I found [this](http://webaudioapi.com/samples/filter/) example of a lowpass which works in Safari, but I've no idea. I have a hunch this has to do with "createMediaElementSource". Any help would be appreciated! Live project can be found [here](http://playground.eca.ed.ac.uk/~s1463054/darksound_interactive/index.html).
Attachments
Patch (8.87 KB, patch)
2015-04-08 08:43 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2015-04-02 15:16:34 PDT
Dup of bug #135042. *** This bug has been marked as a duplicate of bug 135042 ***
Jer Noble
Comment 2 2015-04-02 15:18:08 PDT
Please try this against a WebKit nightly build on Mac OS X Yosemite.
Benjamin Poulain
Comment 3 2015-04-03 15:54:16 PDT
Reopening. The test case still does not work on Nightly.
Jer Noble
Comment 4 2015-04-07 21:08:05 PDT
That test case uses a .mp3, which (for whatever reason) does not have an initially enabled audio track. I'll upload a patch shortly.
isaacshinman
Comment 5 2015-04-08 02:38:55 PDT
@Jer Noble: what do you mean by an "initially enabled audio track"? I have not seen a single working example anywhere on the web of filters working successfully on a createMediaElementSource.
Jer Noble
Comment 6 2015-04-08 08:36:45 PDT
(In reply to comment #5) > @Jer Noble: what do you mean by an "initially enabled audio track"? I mean, when the AVAsset posts a notification that the asset's metadata is completely loaded, the single AVAssetTrack in the asset's tracks array is disabled. > I have > not seen a single working example anywhere on the web of filters working > successfully on a createMediaElementSource. I've got a few. I'm not saying there's not a bug here; just stating the nature of it.
Jer Noble
Comment 7 2015-04-08 08:41:57 PDT
*** Bug 143510 has been marked as a duplicate of this bug. ***
Jer Noble
Comment 8 2015-04-08 08:43:55 PDT
WebKit Commit Bot
Comment 9 2015-04-08 11:13:52 PDT
Comment on attachment 250354 [details] Patch Clearing flags on attachment: 250354 Committed r182555: <http://trac.webkit.org/changeset/182555>
WebKit Commit Bot
Comment 10 2015-04-08 11:13:57 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.