Writing a Simple Media Player with SDL, part 4: Audio streams
Channel: Ryan C. Gordon
Date: 03/03/2022

Look, this is not the most fun video, unless you enjoy watching me struggle, in which case it's the most fun so far.

At the end of this, we are feeding data in smaller chunks to the audio device instead of just barfing the whole thing out at once, and can handle any audio format, even as the files change, without reopening the device for each file. This took some gymnastics, but it's going to open the door to us doing cool stuff.

Source code for today's efforts:

https://github.com/icculus/sdlamp/blob/403382ae9a1a49f056c2b23d5d614c9f81a8cb5b/sdlamp.c

Curious if money can actually buy happiness? Me too. Contribute to my Patreon:

https://patreon.com/icculus


This video uses music from Kevin Hartnell under the Creative Commons license:

Kevin Hartnell - "CC BY-SA 4.0"
Overlook Hotel Records R237-0CC

©2016 Kevin Hartnell / Overlook Hotel Records

This is a collection of instrumental music released under the CC BY-SA 4.0 license.
Credit to: Kevin D. Hartnell
Please link back to www.kevinhartnell.com