incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Kwiatkowski <nicho...@spoon.as>
Subject Re: [Native Extension] Interval/Polling response from C to AIR
Date Sat, 11 Feb 2012 19:10:26 GMT
The approach I took was to fire an event from C once the internal buffer
went from empty to having some content.  That way I wasn't flooding the AVM
with lots of events that were redundant.  The fastest it
could possibly fire would be once per frame.  The issue I had with the
ArduinoConnector was making sure that the UART didn't flood (which can
happen quick when you only have 2k buffer and a 115200 transmission speed).


Timer calls happen in their own thread, so that is not a bad way to do it
-- I just didn't want to keep diving into my ANE if there was no data.

-Nick

On Sat, Feb 11, 2012 at 12:33 PM, Tomislav Pokrajcic <tomislav@svemir.net>wrote:

> We didn't experience any problems with frequent ANE polling, but event
> driven approach is probably better for working with MIDI signals.
>
> Our data is changing constantly and much faster than we poll it, so
> working with timer was the only way for us.
>
> However wandering if it would be a better approach to trigger data updates
> by status events from C or have timer in as3 as we did it?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message