text
stringlengths 0
2.2M
|
---|
<< " when executing: " << msg;
|
LOG(ERROR) << ss.str();
|
throw std::runtime_error(ss.str());
|
}
|
}
|
void check(const void* ptr, const char* msg, const char* file, int line) {
|
if (!ptr) {
|
std::stringstream ss;
|
ss << file << ':' << line
|
<< "] libsox failed to allocate when executing: " << msg;
|
LOG(ERROR) << ss.str();
|
throw std::runtime_error(ss.str());
|
}
|
}
|
} // namespace detail
|
} // namespace sfx
|
} // namespace speech
|
} // namespace pkg
|
} // namespace fl
|
#include "ofApp.h"
|
//--------------------------------------------------------------
|
void ofApp::setup(){
|
ofSetVerticalSync(true);
|
// we add this listener before setting up so the initial circle resolution is correct
|
circleResolution.addListener(this, &ofApp::circleResolutionChanged);
|
ringButton.addListener(this,&ofApp::ringButtonPressed);
|
// change default sizes for ofxGui so it's usable in small/high density screens
|
ofxGuiSetFont("Questrial-Regular.ttf",18,true,true);
|
ofxGuiSetTextPadding(20);
|
ofxGuiSetDefaultWidth(300);
|
ofxGuiSetDefaultHeight(40);
|
gui.setup("panel"); // most of the time you don't need a name but don't forget to call setup
|
gui.add(filled.set("bFill", true));
|
gui.add(radius.set( "radius", 140, 10, 300 ));
|
gui.add(center.set("center",glm::vec2(ofGetWidth()*.5,ofGetHeight()*.5),glm::vec2(0,0),glm::vec2(ofGetWidth(),ofGetHeight())));
|
gui.add(color.set("color",ofColor(100,100,140),ofColor(0,0),ofColor(255,255)));
|
gui.add(circleResolution.set("circleRes", 5, 3, 90));
|
gui.add(twoCircles.setup("twoCircles"));
|
gui.add(ringButton.setup("ring"));
|
gui.add(screenSize.set("screenSize", ofToString(ofGetWidth()) + "x" + ofToString(ofGetHeight())));
|
bHide = true;
|
ring.load("ring.wav");
|
}
|
//--------------------------------------------------------------
|
void ofApp::exit(){
|
ringButton.removeListener(this,&ofApp::ringButtonPressed);
|
}
|
//--------------------------------------------------------------
|
void ofApp::circleResolutionChanged(int & circleResolution){
|
ofSetCircleResolution(circleResolution);
|
}
|
//--------------------------------------------------------------
|
void ofApp::ringButtonPressed(){
|
ring.play();
|
}
|
//--------------------------------------------------------------
|
void ofApp::update(){
|
}
|
//--------------------------------------------------------------
|
void ofApp::draw(){
|
ofBackgroundGradient(ofColor::white, ofColor::gray);
|
if( filled ){
|
ofFill();
|
}else{
|
ofNoFill();
|
}
|
ofSetColor(color);
|
if(twoCircles){
|
ofCircle(center->x-radius*.5, center->y, radius );
|
ofCircle(center->x+radius*.5, center->y, radius );
|
}else{
|
ofCircle(center->x, center->y, radius );
|
}
|
if( bHide ){
|
gui.draw();
|
}
|
}
|
//--------------------------------------------------------------
|
void ofApp::keyPressed(int key){
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.