Skip to content

Instantly share code, notes, and snippets.

View martinpiper's full-sized avatar

Martin Piper martinpiper

View GitHub Profile
@kbjorklu
kbjorklu / waveOut.cpp
Created August 23, 2013 09:27
Sample code for the waveOutWrite function.
#include <windows.h>
#include <mmsystem.h>
#pragma comment(lib, "winmm.lib")
int main()
{
HWAVEOUT hWaveOut = 0;
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 };
waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL);
char buffer[8000 * 60] = {};