Can an oF audio applications be "console-only"?

Hi there.

This is my first post and, even if I’ve been writing C++ code for the last 20 years, I feel a perfect noob :smile:

I need to write an audio player (for Windows) that will obey to OSC commands. I’d like it to be as lightweight as possible, so I am wondering if an oF application can be console-only, with no graphical output.

Thank you

sure you can.
Use the ofAppNoWindow renderer.
replace your main.cpp contents by the following.

#include "ofMain.h"
#include "ofApp.h"
#include "ofAppNoWindow.h"

//========================================================================
int main( ){
	ofAppNoWindow window;
	ofSetupOpenGL(&window, 1024,768,OF_WINDOW);			// <-------- setup the GL context
	ofRunApp(new ofApp());
}

best

2 Likes

Great!
Thanks!

Thanks @roymacdonald.

Edit:

But its not working on 0.9.3 armv7 version
Error is:
“ofAppNoWindow was not declared in this scope”

did you include this line?
Having not will explain the problem.
best

Yes, sure .

I added header file to main.cpp

best

Try with ofAppNoWi n dow :wink:

2 Likes