Skip to content

Instantly share code, notes, and snippets.

View mchalain's full-sized avatar

Chalain mchalain

View GitHub Profile
@mchalain
mchalain / player.c
Created April 6, 2020 10:00
Simple noise generator
#include <alsa/asoundlib.h>
#include <stdint.h>
#include <stdlib.h>
#include <sched.h>
snd_pcm_t *player_init(char *soundcard, int nbsamples)
{
int ret;
snd_pcm_t *playback_handle;