Day 3: Lua and the World
You’ve started down the path to adventure, treading lightly at first through Lua’s gates. You’ve found the simplicity and power in its data structures and concurrency routines. Now, it’s time to apply that knowledge and use Lua to build a real project.
Today, we’re going to make music with Lua. Lua doesn’t come with a sound library, but there are plenty around that are written in other languages. We’ll use one of Lua’s strongest features, its C interface, to control an open source music library.
A few stalwart adventurers have blazed this trail before us. They’ve used Lua’s expressiveness for their program’s logic, C for the performance-critical code, and the techniques in this chapter to glue the two together. For instance, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access