Steam Audio

Steam Audio

Examples for API?
Are there any examples on how the API works? I'm having trouble understanding how the pipeline is suppose to be setup. Where do you feed in the audio data and where is the output? Do you just give it all the audio data for a single frame then it combines it into a single output? Or is every buffer processed separately. There's only a few places where you can specify the position of the listener so I'm not sure how everything else is related.
< >
Showing 1-5 of 5 comments
I'm having the same problem right now. The documentation is not bad, but it's really hard to get a good overview.

From Google's cache of the old Impulsonic website, which now redirects to the Steam Audio page, you can get the links to the old phonon documentation: https://webcache.googleusercontent.com/search?q=cache:c46sg1YbPjQJ:https://www.impulsonic.com/+&cd=1&hl=de&ct=clnk&gl=de

It's outdated, but at least the introduction of the C API reference PDF is still helpful: http://downloads.impulsonic.com/phonon/3d/1.7/phonon3d_api_1.7.pdf
Alright, I figured out the basics:

Phonon actually does not manage your audio sources in the scene and it does not load any audio files or play them on its own. You have to integrate it into another audio engine.

In my case, I use SDL_mixer and simply load and play my sounds as normal for every audio source. This results in all the sounds being played with no 3D audio applied.

To use Phonon, you have to manually apply the effects that you want to each audio source seperately in each audio frame. To do so, first create the renderers and effect you need for every audio source.

Then, for example, in SDL_mixer I can specify a callback function that gets called every time an audio frame is being played and lets me change the raw audio samples any way I want. Here, I convert the data from SDL_mixer to a IPLAudioBuffer, which I can apply my effects on, for example by calling iplApplyBinauralEffect. Then, I convert the IPLAudioBuffer back to what my audio engine needs and return it.

I would recommend to look at the C# source code of the Steam Audio Unity plugin. In particular the class PhononEffect, which would be added to every audio source in the scene.
Sweet thanks, I didn't know you could see the source for the unity plugin. That's definitely a good place to look for examples.
Hi Timber, I had some successes using the C API in OpenFrameworks. Here's a small example that uses Object-Based Binarual Effect. Hope it helps.

https://github.com/cuong3/testSteamPhononOF
We've added more introductory material to the Steam Audio API documentation, including a sample program for rendering HRTF-based binaural audio. Get the latest version of the Steam Audio SDK, v2.0-beta.2, here[valvesoftware.github.io].
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Feb 24, 2017 @ 12:51pm
Posts: 5