DevBlog 21 - Writing a simple Audio System in OpenAL

Published April 04, 2022
Advertisement




Adding audio to my engine.

I used OpenAL as the API is similar to OpenGL, the graphics API of this project.

I've added sounds to ship engines, lasers, explosions, UI, and more.

OpenAL makes Doppler effects easy, it just works out of the box.

I know there isn't sound in space, but I'm take a more stylized approach and wanted sounds.

I also made the audio system work with time dilation.

We can scale the pitch of audio by the current time dilation factor.

This has the effect of making the sounds sound deeper in slowmo, and higher in fast speed.

I created the entire system with a top down approach.

To know how it works, you can to the AudioSystem::tickAudioPipeline function.

I also created some debugging tools.

You can enable a cheat that creates visual shapes at emitter locations.

This can be used to get an idea of what is causing a sound and where it is at.

I also created conditional logging that can be used to track emitter states.

This type of logging was perhaps the most useful in diagnosing problems.

I showcase my new audio system in action then give a high level overview of the c++ code

0:00 Demoing the Audio System

1:07 Time Dilation Demo

1:31 System c++ Overview

6:40 Useful Audio System Debugging Tips

0 likes 1 comments

Comments

Kladdo

Hello everyone, just a quick tip from me. I came across a wonderful service that writes articles https://99papers.com/reviews/ to order and doesn’t cost much at all. They delivered exactly what I needed, on time and with great quality. If you're looking for a reliable and affordable article writing service, I definitely recommend them. Give it a shot!

August 13, 2024 02:21 AM
eddysmith

Balancing work and school can be overwhelming, but domyhomeworkfor.me has been my go-to for handling difficult assignments. Their team of experts delivered a well-researched and flawlessly written paper that exceeded my expectations. The entire experience was smooth, and their reasonable rates make it even better. If you need professional help to keep up with your studies, I can't recommend this service enough. They've made my life so much easier!

September 03, 2024 08:24 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement