Skip to content

Instantly share code, notes, and snippets.

View sturlamolden's full-sized avatar

Sturla Molden sturlamolden

View GitHub Profile
#include <Windows.h>
#include <mmsystem.h>
#include <math.h>
static BOOL inited = FALSE;
static double dhz;
void usleep( long us )
{
const double sleep_granularity = 2.0E-3;
@sturlamolden
sturlamolden / audioprocessing.py
Last active December 21, 2015 19:19
Example of audioprocessing in Windows with Python 2.7 using NumPy and pywin32 (Microsoft DirectSound)
""" Copyright (C) 2013 Sturla Molden """
import threading
import Queue
import pywintypes
import win32event
import win32com.directsound.directsound as directsound
import numpy as np
@sturlamolden
sturlamolden / hello.py
Created July 30, 2012 20:51
Hello World (testing gist)
print 'Hello World!'