PortAudio Port Help Request
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Nov 3 01:58:04 UTC 2005
On 2-Nov-05, at 5:32 PM, Brad Fuller wrote:
> John M McIntosh wrote:
>
>> I'll note you can choose to either make:
>>
>> A lightweight plugin that interfaces to a platform-agnostic api
>> that requires you to use lots of platform specific C code.
>>
>> A heavyweight class(es) that manages data and passes data only to
>> a plugin which makes the DLL API call, no pre/post C code
>> wrapping api call.
>> or a plugin that abuses self cCode: inSmalltalk: and makes the
>> api calls required and has no external C code, except for say a
>> DLL library of some sort.
>
> Thanks for your input, John.
> Don't you think the former (lightweight) would be more beneficial
> (in the long run) for cross platform support? Then again, any
> update to PortAudio might mean more C programming in the primitive?
> (oopss.. you agree.. I just re-read below!)
>
> What do you suggest?
In the past, the number of people willing to fix and update primitive
based plugs is small, the number to update smalltalk code is large.
People also realize that the knowledge to build a plugin is high,
although a team member of the Sophie project is attempting to address
this issue.
Both flavours then have different issues when promoting change into
the base VM/Image.
>
>>
>> Or of course use FFI.
>
> Don't you think FFI would not be a good choice for my goal to be
> easily cross platform? I don't know, I don't have any real-world
> experience with primitives nor FFI except for reading the doc on
> the swiki
Well lots of things in croquet are done via FFI. The issue is
performance, the setup for FFI calls is large as compared to plugin
call.
If you go with FFI expect to spend some time learning how to stuff
things in/out of C structures via smalltalk code, where as a
lightweight plugin can
do the conversion to/from objects with less hassle.
Mind of course with FFI changes are smalltalk code (and perhaps a
third party dll) , versus a plugin with smalltalk, c code, a binary,
and the third party dll.
Maybe someone else can comment? I've really only done both heavy and
lightweight plugins and fixed the FFI code from time to time.
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|