Bug 143332 - [Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when the list of enabled audio tracks change.
Summary: [Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.10
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
: 143510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-02 03:30 PDT by isaacshinman
Modified: 2015-04-10 01:23 PDT (History)
7 users (show)

See Also:


Attachments
Patch (8.87 KB, patch)
2015-04-08 08:43 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description isaacshinman 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).
Comment 1 Jer Noble 2015-04-02 15:16:34 PDT
Dup of bug #135042.

*** This bug has been marked as a duplicate of bug 135042 ***
Comment 2 Jer Noble 2015-04-02 15:18:08 PDT
Please try this against a WebKit nightly build on Mac OS X Yosemite.
Comment 3 Benjamin Poulain 2015-04-03 15:54:16 PDT
Reopening. The test case still does not work on Nightly.
Comment 4 Jer Noble 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.
Comment 5 isaacshinman 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.
Comment 6 Jer Noble 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.
Comment 7 Jer Noble 2015-04-08 08:41:57 PDT
*** Bug 143510 has been marked as a duplicate of this bug. ***
Comment 8 Jer Noble 2015-04-08 08:43:55 PDT
Created attachment 250354 [details]
Patch
Comment 9 WebKit Commit Bot 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>
Comment 10 WebKit Commit Bot 2015-04-08 11:13:57 PDT
All reviewed patches have been landed.  Closing bug.