Closed ciarandg closed 3 years ago
Hi. This issue seems to be fixed between v2.20 to v2.27.2 (I tried to fix it and found that already solved...)
Please make sure that your DspFaust.cpp contains a class ofaudio
which has a callback function with audioInput(ofSoundBuffer& input)
as an argument, not a audioInput(float* input, int bufsize, int channels)
. This class comes from ${faust_installed_directory}/include/faust/audio/of-audio.h
. Of course, it can be solved by replacing this file to the latest version manually.
Also, as ofaudio
class does not allow you to select an audio device other than a system-default device, you can manually set up ofSoundStream
with raw dsp
class code without any architecture file.
btw, I have tried to make an architecture file to generate ofxGui components from faust's UI definitions. It may be outdated but may be helpful to use faust and oF together.
Hi, I'm trying to get started with Faust and OpenFrameworks, and am struggling to get any audio output from my program. I have a .dsp file named sin.dsp that contains the following:
import("stdfaust.lib"); process = os.osc(440);
I ran
faust2api -nozip -of sin.dsp
, put#include "DspFaust.h"
in myofApp.h
file, and addedDspFaust faust = DspFaust(44100, 512);
to the public section. In myofApp.cpp
file I putfaust.start();
in theofApp::setup()
method. These are the only changes I've made to the default OF project template. It compiles and runs just fine, without any errors, but I'm not getting any audio output. Am I missing something? I know that it's successfully connecting to my JACK server, because in Carla I can see that it is creating a node calledRtApiJack
. Additionally, faust.isRunning() returns true and faust.getCPULoad() returns 0.Apologies if I'm overlooking something obvious -- I'm fairly new to C++ and totally new to OF. Thanks in advance!