Gerry,
If you can go with an app, check out Zinc.  It offers several system 
interfaces, including invoking DLLs directly:
http://www.multidmedia.com/support/livedocs/
--Dave


On Jul 19, 2011, at 9:00 AM, flashcoders-requ...@chattyfig.figleaf.com wrote:

> Message: 12
> Date: Tue, 19 Jul 2011 18:04:56 +0800
> From: Gerry Beauregard <gerry.beaureg...@sonoport.com>
> Subject: Re: [Flashcoders] Calling native code from Flash
> To: Flash Coders List <flashcoders@chattyfig.figleaf.com>
> Message-ID: <33c7166e-228c-476a-872d-ce45a0b8b...@sonoport.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Thank you Paul and Karl for your responses!  Interesting discussion!
> 
> On 2011-07-19  , at 17:36 , Paul Andrews wrote:
> 
>> On 19/07/2011 10:27, Karl DeSaulniers wrote:
>>> Hi Paul, Gerry,
>>> Are these runtime calls, or calls to set up runtime?
>>> How is the swf published? Local? Server?
>>> If Local, you could try javascript.
>>> Calling the javascript before you need the results in flash.
>>> Then que the results so there is no latency, like a buffer?
>>> 
>>> If server, I would go with Paul's socket suggestion or a perl script.
>>> Or call the php before you need the results in flash.
>>> A small php script takes milliseconds to execute.
>> 
>> Maybe, but there's network latency to be added to that. DSP usually requires 
>> fast real-time processing, so latency defeats the object of using native 
>> code. My suggestion about the socket server would be to install that on the 
>> client, not a remote server. Even so I suspect the latency will be too big.
>> 
> 
> The application involves real-time audio DSP with very low latency. Audio 
> data would need to be passed from the AS3 code to the native code for 
> processing, with results passed back from the native code to AS3.  It'd be a 
> lot of data, easily a half dozen streams of 16-bit 44.1kHz audio.
> 
> Given the amount of data involved and the real-time low-latency requirements, 
> it's almost certainly not practical to go through php, perl, or javascript 
> bridging code.
> 
> I sort of expected that calling native code in an efficient way wouldn't be 
> possible, due to the security sandbox issues as Paul mentioned. I was just 
> hoping there was some trick to do it...   Maybe with signing of native 
> binaries so they're considered trusted by Flash?  Maybe having the user give 
> permission to use native code (analogous to how the user needs to give 
> permission to use the microphone input, for example)? But I guess there isn't 
> :-(  
> 
> Looks like I'll have to squeeze whatever performance I can from code written 
> in AS3. Looking on the bright side, at least I can stick to one language :-)
> 
> Thanks again for all your suggestions and feedback!
> 
> -Gerry
> 


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to