Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Valve Makes All Steam Audio SDK Source Code Available Under Apache 2.0 License (phoronix.com)
252 points by Bender on Feb 20, 2024 | hide | past | favorite | 62 comments


This is the Impulsonic middleware they acquired back in 2017. They quickly made it free in binary form, but third party uptake seems to have been practically non-existent, probably in large part because they only made it available on PC and Android but not any of the consoles or iOS. They also promised Wwise integration but that never materialized and doesn't appear to be anywhere in the open source release.


Interestingly, the repo's readme says it works on Win/Mac/Linux, Android and iOS. Wonder if they had builds going but never released them to others.

https://github.com/ValveSoftware/steam-audio


It always supported Win/Mac/Linux (that's what I meant by PC) but iOS seems to have landed on GitHub a couple of months ago, and they neglected to update the website.

https://github.com/ValveSoftware/steam-audio/commit/b86a4284...

Still no consoles or Wwise out of the box, but I suppose developers now have the option to do that plumbing themselves if they think it's worth it.


> It always supported Win/Mac/Linux (that's what I meant by PC)

I would guess that for a lot of people, PC is read as "Windows". Probably in part due to the marketing campaigns of the mid-2000s that would compare "PC vs Mac" which is of course dumb but even in reading that myself, my brain swapped out PC for Windows


From Valve, specifically, they have gone a long way to making it so that PC reads as "Steam." Has some shortcomings, I think, but largely works.

Does leave Mac out a bit. Such that I think you have a point. Not sure how much the market for this software makes that distinction, though.


A lot of games on Steam work natively on mac. With the game porting toolkit, it's likely that the vast majority of them work - though maybe not all too well.


I bet they did not release the source code immediately because they wanted to make sure there was no patent infringement hiding anywhere in it.


I am starting to learn gamedev, in specific I would like to make a stealth game.

Ever since I first read about steam audio, I've wondered if it would be possible to use the sound propagation to determine if a npc has heard a sound. There are probably better ways to do this. And not always the most realistic approach is the best approach.

But I've always found that some games are very inconsistent about how npcs hear you. Sometimes you are in a closed room and make very little sound, and they hear you from outside, other times you are in an open place and they don't hear anything. It seems like some games only check the distance to sound origin, without taking occlusion/attenuation into consideration.


I'm no expert but one issue is that "correct" sound propagation needs to handle frequency dependent refraction (why sound is muffled coming from the other room, in additional to leakage through the wall).

One total hack I would imagine would work alright is to render the scene twice, once displayed to the player and the other where the only light sources are the player's sound and walls/windows/etc just have some opacity changed. If the light around the enemy is above a threshold the player is detected. You wouldn't need to render the whole scene, just the area immediately around the player, and avoid doing it if there are no enemies.

Another hack that would be more involved would be to compute a kind of graph for the whole level and when a player makes noise, you propagate it through the graph using precomputed weights. You'd have to handcraft a graph for every level. But I could imagine this getting the best results in terms of performance and gameplay, since you could tune it per scene.


Most games don't have the time budget for that. Visuals take precedence, and it's not easy to get to 60fps as it is, especially if you're doing a lot of other processing.

And stealth games especially will probably rely a lot on shadows and other visual things, which make rendering more expensive.


That's true, I just like when stealth games go beyond just player visibility, some of my inspirations do that:

- Thief Gold, sound was important, each surface would make a certain amount of noise, and you could damp the noise by covering the ground in moss, or reduce it by walking slower.

- Splinter Cell Chaos Theory: which had a sound-meter with 2 indicators, one for the noise you are making and the background noise. I specially like this system because of how it allows you to make much more well-informed decisions.

- Sniper Elite: you can cover the sound of your rifle with loud background noise in some maps, they are regular, and they have cue moments before the loudest part.


Not PvE, but Hunt Showdowns use of sound is worth mentioning. Like you mentioned, every surface has a sound and level, animals react to your sight and sound and will make their own noises, weather and env effects cover or uncover sounds, you can use items or gunfire or anything else to decoy. Really great. All a pvp game so you're trying to sneak up on actual people


I'm not sure if anything has it built in, but Thief: The Dark Project (in 1998) had sound propagation. There's some discussion about it here: https://www.ttlg.com/forums/showthread.php?t=151206. I wonder if you could query Unity's navmesh to calculate the distance, but that wouldn't work with, say, someone on the second floor hearing someone outside through the window.


Wouldn't you have an alternate navmesh for sounds with the appropriate "cost" heuristics based on how well sounds propagates through the mesh's material and across media?


This sounds like a great use of hardware accelerated raytracing. The problem itself is very similar. Sound attenuation can be modelled as transparency.


What you probably want is to place a virtual listener/receiver where the NPC is, so the system would use the same rendering that it does for the player. Then you put an envelope detector on the signal and you have an approximation of how much sound is reaching that NPC.

You could also render the player sound separately from environmental sounds. So the NPC only hears the player if their sound exceeds the environmental noise.

You could get real fancy and do some directional processing on the NPC so they’ll go in the apparent direction.

It’s probably overkill though. You could probably do a much cheaper approximation and it would feel about the same to the player. It would be fun to test it out and see though!


I am - very slowly - learning Unreal and they do seem to have such functionality. E.g. https://dev.epicgames.com/community/learning/tutorials/5Ed/u...

Since they have a full sound engine built-in as well, I suspect they deal with attenuation, et al correctly.


A couple of impressions from someone whose knowledge of this is limited entirely to the project landing page:

https://valvesoftware.github.io/steam-audio/

First, one of the little screenshots references Sansar, so it must be good!

Second, I sense that whatever software is responsible for the screenshot in the background would flunk an Old Man Murray Start to Crate test:

https://www.oldmanmurray.com/features/39.html


Since they hired Erik and Chet it's been an inside joke at Valve to fail the crate test as soon as possible.

(Erik left and returned, Chet has a YouTube channel now.)


Awesome.


I wish they developed this further as a cross-platform competitor to Windows Sonic / Dolby Headphones / DTS Unbound.

It’s quite nice to got quasi-surround from a 5/7.1 source with just some headphones and HRTF magic, and its one of the biggest things I miss with gaming on Linux.


You can enable that manually as long as the app exposes enough outputs. https://kaeru.my/notes/pipewire-surround-headphones


What I've always found weird in gamedev is that everyone under the sun builds their own graphics engine - I don't think there's even popular middleware for that.

But almost nobody builds their audio engine - to the point that basically there's no good open source audio engine in existence. I wonder why is that - while the requisite knowledge is not as readily available as it is for graphics, and this might be hubris speaking, but it can't be that much more difficult.


That's good, since similar project from [1] Google as often happens is dead.

[1] https://github.com/resonance-audio/resonance-audio


Question from someone who is pretty far separated from game dev: Is this now an open source alternative to fmod and wwise?


Steam Audio is only concerned with spatial audio rendering, which is a subset of what Fmod and Wwise do.

Any time you hear dynamically mixed music in a game, for example, that was probably arranged using Fmod or Wwise.


What in particular feature enables or facilitates dynamic music? Is that not just a different music file?


They provide the editing tools for a musician to build up the dynamic composition and state machine that drives it, plus the runtime component which executes all that inside the game.

It's basically a whole DAW specialized for games: https://www.youtube.com/watch?v=7A1HMOsD2eU


I see, thanks


How does this compare to fmod?


Seems like they're giving up (on HMD hardware). Index will probably be the last headset Valve makes. It was a fun idea. But with the Vision Pro showing that even Apple can't make the "smartphone strapped to your face" version of VR work, it's becoming pretty obvious that it's a technological dead end for anyone but niche gamers.


I'm clearly just a casual passer-by. Any chance you could elaborate the connection between opening an audio SDK and giving up on hardware? To me that feels like a big leap.


> it's becoming pretty obvious that it's a technological dead end for anyone but niche gamers.

Even if that's the case, it's OK to have a niche product. Gaming is a multi-billion dollar industry so the market is worth pursuing.


Giving up on hardware? The steam deck OLED was released last November


I have a copy of every piece of Valve hardware except for a Steam Machine, and if there's anything that that's taught me, it's that Valve cannot make hardware v2 in anything. I snapped up the transparent case OLED Steam Deck immediately because I do not expect there to be a Steam Deck 2


I’ve understood it as: Valve isn’t really in the hardware or console business. They release these fairly open devices in the hopes they get copied by others. Either to create a new market for Steam or to ensure an upcoming market has at least some Steam compatible devices.


Or they work with manufacturers like with HTC and Oculus for SteamVR, and the original Steam Machines which the only manufacturer I remember is Alienware.

Though they seem to be keeping SteamOS 3 close to their chest.


Valve knows how to count to 2, it just takes a long time. Now I would never expect a v3 of anything...


With how well the steam deck was received, I'd expect them to lean more into it? Is it better in press than it was in actual sales?

And I know I have tentative plans for the next VR thing they try. I have the PSVR2 and it is really good at the games it is for. To the point that I'd expect next generation efforts to be amazing.


The problem is that Valve’s profit margin on the store is very healthy. Low production runs of a hardware device are just not making them a lot of money comparatively.


That being said, Steam Deck probably sells more games than, for example, the Steam Controller did. Probably sells more games than their VR headset did too.


Fair. That said, I get the impression they still do a lot because they want to. Not necessarily because they have to.


Valve is a privately held company. It's not forced to maximize quarterly returns for shareholders, it just does whatever Gabe wants.


Vision pro is laptop chips and silicon backplane microdisplays, a bit of a move away from the smartphone on your face approach components wise, though I'm sure some of the sensors may be shared.


Thats a pretty hot take.

It's way too early to say the Vision Pro is a flop. Remember, the first Apple Watch received mixed reviews. Yet, after several updates and feature additions, it became one of the most, if not the most, popular wearables.

History often repeats itself with Apple products initially deemed failures. To illustrate, consider the initial reception of the iPod, as discussed in this link:

https://forums.macrumors.com/threads/apples-new-thing-ipod.5...

One more thing, Valve hasn't exited the hardware market. The Steam Deck is a clear indication of their ongoing commitment.


Yeah Vision Pro strikes me as typical Apple first gen more than anything. It might in reality be a flop, but I’d wait a few hardware generations before declaring as such with any level of certainty.


But.... the Watch was a failure and failed to find its market fit. It never took off with biohackers, it isn't useful for interacting with products or services or any communications service, and it can't even really tell the time unless you charge it every other day.

The Steam Deck otoh became an absolute hit on day one and completely sold out in short order. It sold waaaayyy better than Valve ever thought it would.


Vision Pro is going to be an interesting watch. I doubt it is bad gear, but it is hard to really understand the market Apple is chasing. In particular, the consumer VR market is dominated by gamers to an absurd degree. Trying to pull casuals into it feels way too strained. Similarly, professional use doesn't seem to be a strong value add, either. Will be interesting to see where things land.


Vision Pro is to meta quest 3 what Starbucks is to local coffee shops.

Meaning, quest 3 is amazing, and Vision Pro is the best thing to happen to AR.

I hope steam doesn’t pull out. Zuck can preach about openness but the platform is still antagonistic to pc users.


I'm still rather bullish against AR. The passthrough of the PSVR2 is nice, to get your controllers in hand and room setup. Otherwise, I don't see the value add, just yet. Heck, the best games make use of the headphones so well that I feel like I'm already in another room.


Apple Watch is a flop. It's not delivered on anything other than being a good fitness tracker.


I would dearly love to have a flop like the Apple Watch... If a product with tens of billions in yearly revenue is a flop, well, sign me up!


At this point, Apple could release a line of $99 drink cozies and sell out 5 minutes after they announce it. The fact that people buy what Apple sells isn't really an indication of whether the product is good or not.


It's been selling well for almost 9 years now! You can call it many things, but it is clearly not a "flop".


I didn't call it a "flop", I said it's status as a flop doesn't correlate to how good a product is. The Butterfly Keyboard never flopped, but it also never got a legitimate competitor. People bought them because they were forced to, same as they were with Airpods and arguably the Apple Watch.

I feel the same way about a lot of Apple products. The Magic Trackpad would sell out instantly if it got a new model with USB-C - but Apple knows they can ship more Lightning cables if they avoid it. It's part of the sinister math that goes into making you and I rely on Apple's constant... ahem, Innovation.


The Magic Trackpad comes with a USB-C (computer) to Lightning (Magic Trackpad) cable.

https://www.apple.com/shop/product/MK2D3AM/A/magic-trackpad-...

(I agree with you, for what it's worth - Apple is weirdly slow to update some of their products; AirPods Max stand out here as missing USB-C and the lossless audio of AirPods Pro.)


You're right, and it doesn't break compatibility with USB (curse the idea of MFi on PC) which is the important part.

Still, it makes my relatively-new Magic Trackpad 2 feel old and alien. Whatever reason there was for Lightning is lost me when I can't juice my peripherals up with the same cable that charges my Macbook.


>If a product with tens of billions in yearly revenue is a flop, well, sign me up!

Windows 11 also sold incredibly well yet I still consider it a flop.


I take it you mean flop differently than a successful product from a business and profit perspective. Like a comedian can flop around on stage in a hilarious bit of slapstick humor which you might call a successful flop. But the two hour comedy special the slapstick is part of might be panned by critics and audiences and that would be a flop of an entirely different sort.


Over 50 million units sold and the most popular wearable device ever made. Yeah, total flop.


> History often repeats itself with Apple products initially deemed failures.

Maybe, but that never saved the Lisa, the Newton or the Butterfly keyboard. Sometimes, Apple takes a big risk that's far too early, expensive or simply doesn't pay off.

I don't think it's a particularly hot take to say that VR/AR content creation has been stagnant for a decade. Valve couldn't save it by moving mountains, Meta barely made it mass-marketable with a barebones MVP, and Apple is... gentrifying the higher-end. It's not so much an insult towards Apple as it is to the field and it's market fit. Nobody has had an "iPhone moment" yet, not even Apple.


In the case of the butterfly keyboard, market fit is a very different thing from engineering failure




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: