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" | |
//------------------------------------------------------------------------------------------- | |
//mostly pulled from CppHelloTriangle.cpp example - void initTextures() | |
//note the code in this seems to have changed a lot in the last few months - so a more up to date Dawn might need some language changes in here | |
void ofApp::makeTextureFromOFPixels( ofPixels & pix ) { | |
auto & device = dawnWindow->mDevice; | |
dawn::TextureDescriptor descriptor; |
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
var LibraryHTML5Audio = { | |
$AUDIO: { | |
players: [], | |
lastSoundID: 0, | |
}, | |
html5audio_list_devices: function(){ | |
console.log("list devices") | |
const constraints = {audio: true}; | |
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 "ofSoundStream.h" | |
#include "ofAppRunner.h" | |
#include "ofLog.h" | |
#if defined(OF_SOUND_PLAYER_FMOD) | |
#include "ofSoundPlayer.h" | |
#endif | |
#ifdef OF_SOUNDSTREAM_RTAUDIO | |
#include "ofRtAudioSoundStream.h" |
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
float audioDuration = (1.0/1000.0) * (float)(lastTimestampMillis-firstTimestampMillis); | |
string audioCommands; | |
if( audioPath.length() ){ | |
audioCommands = " -ss "+ofToString(timelineOffset, 3)+" -t " + ofToString(audioDuration, 3)+ " -i "+ ofToDataPath(audioPath, true); |
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
0:00:00.000038000 [36m50075[00m 0x7fc196f05e00 [36mINFO [00m [00;01;31m GST_INIT gst.c:586:init_pre:[00m Initializing GStreamer Core Library version 1.18.6 | |
0:00:00.000064000 [36m50075[00m 0x7fc196f05e00 [36mINFO [00m [00;01;31m GST_INIT gst.c:587:init_pre:[00m Using library installed in /Library/Frameworks/GStreamer.framework/Versions/1.0/lib | |
0:00:00.000082000 [36m50075[00m 0x7fc196f05e00 [36mINFO [00m [00;01;31m GST_INIT gst.c:607:init_pre:[00m Darwin DesignIOLaptop.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64 | |
0:00:00.000345000 [36m50075[00m 0x7fc196f05e00 [36mINFO [00m [00;01;31m GST_INIT gstmessage.c:129:_priv_gst_message_initialize:[00m init messages | |
0:00:00.000971000 [36m50075[00m 0x7fc196f05e00 [36mINFO [00m [00;01;31m GST_INIT gstcontext.c:85:_priv_gst_context_initialize:[00m init contexts | |
0:00:00.001255000 [36m50075[00m 0x7fc196f05e00 |
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" | |
#include "SampleUtils.h" | |
#include "utils/ComboRenderPipelineDescriptor.h" | |
#include "utils/DawnHelpers.h" | |
#include "utils/SystemUtils.h" | |
#include "GLFW/glfw3.h" |
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
static vector <int> getPeaks( ofPolyline & l, float angleThresh, int numToLook, bool bInvert, bool bGroup, int numToSkip = 0 ){ | |
vector <int> results; | |
if( l.size() >= 3 ){ | |
for(int k = 0; k < l.size(); k++){ | |
ofPoint normal; | |
bool bPeak = true; | |
for(int j = 1; j < numToLook; j++){ |
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 findHomogrpahy( vector <ofVec2f> inPts, vector <ofVec2f> outPts, CvMat * homography){ | |
homography = cvCreateMat(3,3,CV_32FC1); | |
CvPoint2D32f * srcPts = new CvPoint2D32f[ inPts.size() ]; | |
CvPoint2D32f * dstPts = new CvPoint2D32f[ outPts.size() ]; | |
for(int i = 0; i < inPts.size(); i++){ |
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 testApp::setup(){ | |
vector <AlliedCamera::CameraInfo> cameras = AlliedCamera::ListDevices(); | |
if( cameras.size() ){ | |
//true means block until the camera is opened and frames are coming in. | |
if( camera.openCamera(0, true) ){ | |
cout << " camera opened " << endl; | |
} |
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
// | |
// UDPImageTransfer.cpp | |
// | |
// Created by Theodore Watson on 9/16/14. | |
// | |
// | |
#include "UDPImageTransfer.h" | |
UDPImageTransfer::UDPImageTransfer(){ |
NewerOlder