This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void viewToTex(NSView * view, ofTexture& tex) { | |
// this is based on listing 11-3 at | |
// https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html | |
NSBitmapImageRep * bitmap = [view bitmapImageRepForCachingDisplayInRect:view.visibleRect]; | |
[view cacheDisplayInRect:view.visibleRect toBitmapImageRep:bitmap]; | |
glPixelStorei(GL_UNPACK_ROW_LENGTH, bitmap.bytesPerRow / bitmap.samplesPerPixel); | |
glPixelStorei(GL_UNPACK_ALIGNMENT, 1); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
cout << "Device Count: " << rtlsdr_get_device_count() << endl; | |
cout << "Open: " << rtlsdr_open(&device, 0) << endl; | |
rtlsdr_set_center_freq(device, 156050000); | |
rtlsdr_set_sample_rate(device, sampleRate); | |
rtlsdr_set_agc_mode(device, 1); | |
rtlsdr_set_freq_correction(device, 0); | |
rtlsdr_reset_buffer(device); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofApp.h" | |
using namespace physx; | |
#define actorFlags PxActorTypeSelectionFlag::eRIGID_DYNAMIC | PxActorTypeSelectionFlag::eRIGID_STATIC | |
PxDefaultAllocator defaultAllocator; | |
PxDefaultErrorCallback defaultErrorCallback; | |
const PxReal extent = 4; | |
const PxReal halfExtent = extent * 0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adam:bin Adam$ pwd | |
/Users/Adam/workspace/scratch/libfreenect/build/bin | |
adam:bin Adam$ ls | |
cppview glview record regview | |
glpclview hiview regtest tiltdemo | |
adam:bin Adam$ ./glview | |
Kinect camera test | |
Number of devices found: 1 | |
Could not open device | |
adam:bin Adam$ ./tiltdemo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[verbose] ofxKinect: Context inited | |
[verbose] ofxKinect: 1 device found | |
[verbose] id: 0 serial: 0000000000000000 | |
[error] ofxKinect: Could not open device 0 | |
[warning] ofxKinect: Device -1 isn't delivering data, reconnecting tries: 1 | |
[error] ofxKinect: Could not open device 0 | |
[warning] ofxKinect: Device -1 isn't delivering data, reconnecting tries: 2 | |
[error] ofxKinect: Could not open device 0 | |
[warning] ofxKinect: Device -1 isn't delivering data, reconnecting tries: 3 | |
[error] ofxKinect: Could not open device 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this .plist to ~/Library/LaunchAgents to have it automatically | |
take effect whenever you log in. It will continue to be active until | |
you log out (even if you delete the file). | |
You can take manual control over it instead by putting the file | |
anywhere else, then using launchctl like this: | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
launchctl load path/to/the/plist/com.admsyn.keep-twitter-alive.plist | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[A] : +0.0 +0.2 +0.0 +0.5 +0.0 +0.3 +0.0 -0.2 +0.0 -0.5 +0.0 -0.4 +0.0 +0.1 +0.0 +0.5 | |
[B] : +0.5 +0.4 +0.2 -0.0 -0.3 -0.4 -0.5 -0.4 -0.3 -0.0 +0.2 +0.4 +0.5 +0.5 +0.3 +0.1 | |
Mixer : use addSourceOnBus() instead of connectTo() | |
[C] : -0.1 -0.4 -0.5 -0.5 -0.4 -0.2 +0.1 +0.3 +0.5 +0.5 +0.4 +0.2 -0.0 -0.2 -0.4 -0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UInt32 propSize = sizeof(UInt32); | |
UInt32 inputAvailable; | |
AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable,&propSize,&inputAvailable); | |
if(!inputAvailable) | |
{ | |
std::cout << "No input available!" << std::endl; | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = 1024 Accel: 0.05265 FFTW: 0.026213 | |
N = 2048 Accel: 0.042565 FFTW: 0.049334 | |
N = 4096 Accel: 0.049206 FFTW: 0.082782 | |
N = 8192 Accel: 0.118918 FFTW: 0.173506 | |
N = 16384 Accel: 0.200201 FFTW: 0.371488 | |
N = 32768 Accel: 0.356826 FFTW: 1.01589 | |
N = 65536 Accel: 0.844955 FFTW: 1.79316 | |
N = 131072 Accel: 1.95759 FFTW: 3.99565 | |
N = 262144 Accel: 4.34179 FFTW: 9.87287 | |
N = 524288 Accel: 9.31858 FFTW: 19.6675 |