On Wed, Jan 7, 2015 at 6:31 AM, Edgar J Berdahl <edgarberd...@lsu.edu>
wrote:
>
> Does anyone have anything to report about compiling Faust directly into
> traditional C code instead of C++? Have you ever tried it?
>
I don't think this has been tried: but I'm not a faust dev, so perhaps
there's some research somewhere hidden way...
> "Reference to *external C functions*, variables and constants can be
> introduced using the foreign function mechanism."
>
Yes, this can be used to *call into* C code from FAUST. An example from a
FAUST based wavetable synth:
C header:
https://github.com/harryhaaren/openAV-Sorcer/blob/master/faust/wavetableReader.h
ffunction code in FAUST:
https://github.com/harryhaaren/openAV-Sorcer/blob/master/faust/main.dsp#L44
This is C (not C++) as the FAUST language itself is functional not OOP, and
hence calling C++ (with classes etc) is not normal. Calling C is easy
though: just pass in the data needed, grab the return value.
> However, all of the architecture files seem to be .cpp and not .c.
>
Indeed: and the generated code is generally a C++ class representing the
FAUST dsp code. Note that different backends to faust may or may not
utilize the C++ code, but I'll let somebody more knowledgeable jump in here
:)
Cheers, -Harry
--
http://www.openavproductions.com
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel