Look at the dsp_sample_adapter class in the following file: 
https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/dsp-adapter.h

You can possibly make a new version that would convert  integer I/O and adapt 
samples for the decorated DSP. This could be a contribution to this file.

Stéphane 


> Le 11 mars 2019 à 08:01, Stéphane Letz <l...@grame.fr> a écrit :
> 
> Hi Qiantan,
> 
> 1) What is the reason to used integer for inputs/outputs ? Where do there 
> come from? What kind of format are they ?
> 
> 2) The Faust compiler generates code has 2 notions of samples : the internal 
> ones that can be float (default), double (when -double is used in the Faust 
> command line), or quad (-quad which means 'long double', but only supported 
> in the C++ backend for now) and the external FAUSTFLOAT format defined in the 
> architecture file. FAUST FLOAT samples are converted in the internal format 
> in both directions.
> 
> Stéphane 
> 
> 
>> Le 11 mars 2019 à 00:44, Qiantan Hong <qh...@mit.edu> a écrit :
>> 
>> Hi there,
>> 
>> I wonder if is there any way to pass integer to an embedded faust prgram 
>> that accept integer inputs/outputs?
>> In the dsp/llvm_c_dsp.h or dsp/llvm_dsp.h, the compute functions only accept 
>> FAUSTFLOAT**.
>> What should I do if I need to feed integer data? Do I need to convert them 
>> to float and will Faust secretly convert (and round) it back? I think this 
>> is not satisfying, though.
>> 
>> Best,
>> Qiantan
>> 
>> 
>> 
>> _______________________________________________
>> Faudiostream-users mailing list
>> Faudiostream-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
> 



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to