Skip to content

Instantly share code, notes, and snippets.

@CaptainJH
CaptainJH / FFMpeg_player.cpp
Created June 15, 2014 11:35
a basic FFmpeg player based on SFML
//
// a basic FFMpeg video player
// FFMpeg 2.2.2
// SFML 2.1
// XCode 5.1.1
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
@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] = {};
@banderson623
banderson623 / monitor.c
Last active December 5, 2020 16:29
Here is my final (?) monitor implementation in C.
/**
* Brian Anderson, Spring 2013
* Com S 352, Assignment 7
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* INTRODUCTION & PURPOSE
* -------------------------------------------------------------------
* Create a monitor library fashioned after the slides shown in class.
* It solves the producer/consumer problem by making sure their
* execution happens in a safe manner, even across multiple threads
@msg555
msg555 / 3dhull.cpp
Last active April 1, 2023 17:39
3D Convex Hull
#include <iostream>
#include <vector>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cassert>
using namespace std;
@naftulikay
naftulikay / ManualVideoCompile.java
Created June 27, 2012 19:43
Generate a video from scratch with Xuggler
package org.tkassembled.xuggle;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@endolith
endolith / minbleps.cpp
Created May 10, 2012 18:20
MinBLEPs (by Daniel Werner)
// MinBLEP Generation Code
// By Daniel Werner
// This Code Is Public Domain
#include <math.h>
#define PI 3.14159265358979f
// SINC Function
inline float SINC(float x)
@sinannar
sinannar / readingCharFromKeyboardWithoutEntering.c
Created March 23, 2012 22:20
Here is a function that implement in c,you can use it if you need a function that takes a character from user without enter
#include <termios.h>
#include <unistd.h>
char mygetch(void);
int main()
{
/*
DRIVER SOURCE CODES HERE