Skip to content

Instantly share code, notes, and snippets.

@madgarden
madgarden / wav-play.c
Last active May 27, 2016 17:59
wav-play: A WAV loader/player I use for all of my projects, created initially for Saucelifter. Just needs a (sound) buffer for output. Only implemented what I currently need for my games, and for that it works just fine. You can find the unfinished stubs in the code.
// The Madgarden games WAV player
// LICENSE
//
// This software is dual-licensed to the public domain and under the following
// license: you are granted a perpetual, irrevocable license to copy, modify,
// publish, and distribute this file as you see fit.
/*
TODO: Post-process clipping (need 32-bit mix buffer)