This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL.h> // The SDL library | |
#include <math.h> // sin, fmod | |
#include <stdio.h> // printf | |
#define BUFFER_DURATION 1 // Length of the buffer in seconds | |
#define FREQUENCY 48000 // Samples per second | |
#define BUFFER_LEN (BUFFER_DURATION*FREQUENCY) // Samples in the buffer | |
void play_buffer(void*, unsigned char*, int); |