Skip to content

etscrivner/sdl_audio_circular_buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL Circular Audio Buffer

This repository contains an example of playing audio by writing raw data to a circular buffer. Playback is provided by the SDL audio callback that reads from this circular buffer.

I couldn't find any good information on this online while debugging my own implementation, so I thought I'd put this together to help others in the future.

Building

The build has been tested on the following operating systems:

  • macOS
  • Linux

To build you should simply have to clone the repository and then do the following:

make all

This will attempt to build the SDL dependency provided along with the code in the repository, and then build the application. If the build is successful, you can then run the example:

./build/circular_buffer

About

Example showing how to play basic sounds in SDL2 with a circular buffer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published