Skip to content

Instantly share code, notes, and snippets.

@tinnnysu
tinnnysu / playwav.c
Last active March 20, 2017 21:31 — forked from armornick/playwav.c
Play a sound with SDL2 (no SDL_Mixer)
#include <SDL2/SDL.h>
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav"
// prototype for our audio callback
// see the implementation for more information
void my_audio_callback(void *userdata, Uint8 *stream, int len);
// variable declarations
static Uint8 *audio_pos; // global pointer to the audio buffer to be played
\documentclass[11pt]{article}
\usepackage{fontspec}
\usepackage{xeCJK}
\usepackage[a4paper]{geometry}
\usepackage{enumitem}
\setlength{\parindent}{2em}
\setmainfont{Noto Sans SC}
\setCJKmainfont{Noto Sans SC}
\setlist[enumerate]{itemsep=0mm, topsep=0mm, parsep=0mm, partopsep=0mm, leftmargin=14mm}