Skip to content

Instantly share code, notes, and snippets.

@amirrajan
amirrajan / explanation.md
Created August 7, 2019 18:24 — forked from AnanthVivekanand/explanation.md
Basic sound synth using SDL_audio, with some examples of frequency manipulation on a sine wave.
	SDL_Init(SDL_INIT_AUDIO);
	SDL_AudioSpec spec, aspec;
	SDL_zero(spec);
	spec.freq = 48000; //declare specs
	spec.format = AUDIO_S16SYS;
	spec.channels = 1;
	spec.samples = 4096;
	spec.callback = callback;
	spec.userdata = NULL;