Re: ScriptProcessorNode/JavaScriptNode iOS vs Android vs MAC OS ( Safari - Chrome)

Kaustubh,

I am attaching you my code. As I told you before it's working on:
Chrome
Version 30.0.1599.66 for MAC
Version 29.0.1547.59 1547059 on Android 4.1.2
Safari
Version 6.0.5 for MAC

Not working on (I can't hear anything, I guess the onaudioprocess isn't
called):

Chrome
Mobile iOS 30.0.1.1599 iPad 4 / iPod Touch 5th     (iOS 6.1.2 - iOS 7)
Safari
Mobile Safari 7.0
Mobile Safari 6.0

I will raise the bug to bugzila in a moment!

Thank you!

PS: The glichtes on Android were because the buffer size were too small...
It's ok on Android now! :)



On Wed, Oct 9, 2013 at 7:29 AM, Kaustubh Joshi <kdj.tikka@gmail.com> wrote:

> Hi,
>
> Could you please raise bug in bugzilla of webkit.org;
> also if possible please share you code so as to speed up further analysis.
>
> br,
> kdj
>
>
> On Tue, Oct 8, 2013 at 6:33 PM, Leonardo Martínez <leolib2004@gmail.com>wrote:
>
>> Hi,
>>
>> I will wait for more feedback from you! Thanks!
>>
>>
>> On Tue, Oct 8, 2013 at 8:04 AM, Kaustubh Joshi <kdj.tikka@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I think on android there is some glitch issue; some patches have been
>>> uploaded but not yet merged.
>>> On iOS need to check with webkit
>>>
>>> br,
>>> kdj
>>>
>>>
>>> On Fri, Oct 4, 2013 at 6:23 PM, Leonardo Martínez <leolib2004@gmail.com>wrote:
>>>
>>>> Hello,
>>>>
>>>> The versions of Chrome that I am using are:
>>>>
>>>> Version 30.0.1599.66 for MAC (works perfectly)
>>>> Version 29.0.1547.59 1547059 on Android 4.1.2 (lt26w, works but with
>>>> glitches)
>>>> Version 30.0.1599.16 on iOS 6.1.3, iPod Touch 5th (doesn't play any
>>>> sound, I guess the onaudioprocess is not being triggered)
>>>>
>>>> Regards!
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Oct 4, 2013 at 6:33 AM, Kaustubh Joshi <kdj.tikka@gmail.com>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please let me know your chrome browser version.
>>>>> Type on tab space to get --> chrome://version
>>>>>
>>>>> br,
>>>>> kaustubh
>>>>>
>>>>>
>>>>> On Thu, Oct 3, 2013 at 8:01 PM, Leonardo Martínez <
>>>>> leolib2004@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>>
>>>>>> I have created an app in HTML 5 that generates white noise on its own
>>>>>> using a ScriptProcessorNode (Google Chrome) or a JavaScriptNode (Safari).
>>>>>>
>>>>>> All is working fine for Google Chrome/Safari on my Mac and also in my
>>>>>> Android phone (not to mention that the performance is really bad on my
>>>>>> Xperia Acro S) but it is not working in Safari/Chrome on my iPod Touch 5th
>>>>>> on iOS 6.1.2.
>>>>>>
>>>>>>
>>>>>>
>>>>>> The code is the following for initialization:
>>>>>>
>>>>>>
>>>>>>
>>>>>> window.AudioContext = window.AudioContext ||
>>>>>> window.webkitAudioContext;
>>>>>>
>>>>>> context = new AudioContext();
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> if(this.context.createScriptProcessor)
>>>>>>
>>>>>> {
>>>>>>
>>>>>>     jsProcessor = context.createScriptProcessor(512, 0, 2);
>>>>>>
>>>>>>     alert("Chrome Desktop/Android");
>>>>>>
>>>>>> }
>>>>>>
>>>>>> else if(this.context.createJavaScriptNode)
>>>>>>
>>>>>> {
>>>>>>
>>>>>>       jsProcessor= context.createJavaScriptNode(512,1,1);
>>>>>>
>>>>>>       alert("Safari");
>>>>>>
>>>>>>      //adding 1 to node input make it works only for Safari on MAC
>>>>>>
>>>>>> }
>>>>>>
>>>>>> else
>>>>>>
>>>>>> {
>>>>>>
>>>>>>     alert("No way");
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>> jsProcessor.onaudioprocess = generateWN;
>>>>>>
>>>>>> gainNode = context.createGainNode();
>>>>>>
>>>>>> jsProcessor.connect(gainNode);
>>>>>>
>>>>>> gainNode.gain.value = 0.5;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I have a button on the screen that when it is touched the gainNode is
>>>>>> connected to context.destination or it's disconnected. I can see that
>>>>>> onaudioprocess event is not triggered on my iPod (iOS 6.1.2 Safari and
>>>>>> Chrome)...
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> What am I doing wrong? Is something different from Safari/Chrome on
>>>>>> iOS than for MAC that I am not considering?
>>>>>>
>>>>>>
>>>>>>
>>>>>> I need to create sound samples on the fly... If this work I would add
>>>>>> a filter node to filter the white noise for generating other sounds as the
>>>>>> user wants.
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> --
>>>>>> Leonardo.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Leonardo.
>>>>
>>>
>>>
>>
>>
>> --
>> Leonardo.
>>
>
>


-- 
Leonardo.

Received on Wednesday, 9 October 2013 10:08:13 UTC