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

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.

Received on Friday, 4 October 2013 12:54:04 UTC