Skip to content

Instantly share code, notes, and snippets.

View cjcliffe's full-sized avatar

Charles J. Cliffe cjcliffe

  • Cubic Productions
  • Lansdowne, Ontario, Canada
  • X @ccliffe
View GitHub Profile
```
[robertdngsimac2:build/SoapySDRPlay/build] rduering% /usr/local/bin/SoapySDRUtil --probe="driver=sdrplay"
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################
Probe device driver=sdrplay
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=40dB fs=2.048MHz rf=222.064MHz bw=1.536MHz if=0.000MHz
```
[robertdngsimac2:~/SoapySDRPlay/build] rduering% /Applications/CubicSDR.app/Contents/MacOS/CubicSDR
Loading:: configuration file '/Users/rduering/Library/Application Support/CubicSDR/config.xml'
Loaded PPM for device 'Generic RTL2832U OEM :: 00000001' at 0ppm
Loaded I/Q Swap for device 'Generic RTL2832U OEM :: 00000001' as not swapped
Loaded Direct Sampling Mode for device 'Generic RTL2832U OEM :: 00000001': off
Loaded offset for device 'Generic RTL2832U OEM :: 00000001' at 0Hz
Loaded PPM for device 'SDRPlay Device (experimental)' at 0ppm
Loaded I/Q Swap for device 'SDRPlay Device (experimental)' as not swapped
Loaded Direct Sampling Mode for device 'SDRPlay Device (experimental)': off
```Ton@TM-MBP:/Users/Ton>/Applications/CubicSDR.app/Contents/MacOS/CubicSDR
Loading:: configuration file '/Users/Ton/Library/Application Support/CubicSDR/config.xml'
Loaded PPM for device 'Generic RTL2832U OEM :: 00000001' at 0ppm
Loaded I/Q Swap for device 'Generic RTL2832U OEM :: 00000001' as not swapped
Loaded Direct Sampling Mode for device 'Generic RTL2832U OEM :: 00000001': off
Loaded offset for device 'Generic RTL2832U OEM :: 00000001' at 0Hz
SoapySDR init..
API Version: v0.3.0-g603da6be
ABI Version: v0.3-0
Install root: /usr/local
```
Audio thread initializing..
Demodulator thread started..
Initialized demodulator stack size of 2048000
Demodulator preprocessor thread started..
Demodulator worker thread started..
Audio thread started.
Audio thread initializing..
Audio thread started.
Set sample rate: 2560000
```
[DEBUG] stream re-init sps: 252
[DEBUG] stream re-init numPackets*sps: 106848
Set sample rate: 2560000
mir_sdr_SetFs: Sample Freq requested 2559999.942780
mir_sdr_2500_SetRegister(0x04, 0x05c28f)
mir_sdr_2500_SetRegister(0x03, 0x011797)
mir_sdr_SetFs: Fs->FsNomHz+dFsHz=2560000.0+0.0Hz=2559999.9Hz FsToggle->0
@cjcliffe
cjcliffe / ml_manual.js
Created October 16, 2011 22:02
Manual mainloop setInterval with locked framerate step
var interval;
// finishes when time-stepped 30fps reaches a virtual 20 seconds (600/30 = 20)
var ml = new CubicVR.MainLoop(function(timer,gl) {
// ...
if (timer.getNumUpdates()===600) {
clearInterval(interval);
finished();
}
}, true, true); // true 3rd param prevents mainloop from starting..
@cjcliffe
cjcliffe / box_animated.js
Created October 11, 2011 23:30
Example of new animation constructor /w .get(xml/json) support
// SceneObject with motion constructor, xml/json/id/url compatible.
var boxObject = new CubicVR.SceneObject({
mesh:boxMesh,
motion: {
position: {
0.0: { x: 0, y: 1 },
1.0: { x: 1 },
2.0: { x: -1, y: 0 },
3.0: { x: -0.5 },
4.0: { x: 0, y: 1 },
@cjcliffe
cjcliffe / CustomShaderMinimal.vfs
Created September 23, 2011 20:46
Minimal Custom Shader with full pipeline rendering for CubicVR.js
<script id="vs" type="x-shader/x-vertex">
void main(void)
{
vertexTexCoordOut = cubicvr_texCoord();
gl_Position = matrixProjection * matrixModelView * cubicvr_transform();
vertexNormalOut = matrixNormal * cubicvr_normal();
cubicvr_lighting();
@cjcliffe
cjcliffe / multisplit.js
Created September 16, 2011 03:00
Split string into array by multiple characters, useful for script parsing.
function multiSplit(split_str, split_chars) {
var arr = split_str.split(split_chars[0]);
for (var i = 1, iMax = split_chars.length; i < iMax; i++) {
var sc = split_chars[i];
for (var j = 0, jMax = arr.length; j < jMax; j++) {
var arsplit = arr[j].split(sc);
if (arsplit.length > 1) {
for (var k = 0; k < arsplit.length; k++) {
if (arsplit[k].trim() !== "") {
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
void gluInvertMatrix(const double m[16], double invOut[16])
{
double inv[16], det;
int i;