Hi, Le 14 août 2010 03:51:00 UTC+2, Hart's Antler <[email protected]> a écrit : > I have the PortAudio blocking API working, simple reading and writing to the > sound card works. PortAudio also has an async API where samples are fed to > a callback as they stream in. But i'm not sure how to define a RPython > function that will be called as a callback from C, is this even possible? I > see some references in the source of rffi that seems to suggest it is > possible.
Yes this is possible. See an example in pypy/rpython/lltypesystem/test/test_ll2ctypes.py in the function test_qsort_callback(). Why are you passing _callable=stream_callback? It should be enough to pass stream_callback directly as a function argument. -- Amaury Forgeot d'Arc _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
