Skip to content

Instantly share code, notes, and snippets.

@ebachard
ebachard / playwav.c
Last active August 24, 2021 12:05 — forked from armornick/playwav.c
Play a sound with SDL2 (no SDL_Mixer)
#include <stdlib.h>
#include <math.h>
#include <SDL2/SDL.h>
#define DEFAULT_AUDIO_PATH "audiofile.wav"
struct AudioSpecUserdata_t {
char* issued;
char* file;
Uint32 event_count;