As I’m going to rework my audio system I want to ask a few things before I begin and mess up again.
The thing is that when I first added sounds for weapons one of the people that tested reported that everytime he fired (and an audionode instance played) his game would stutter as if the sound was running on the main thread, making it unplayable. After that I reduced the number of audionodes from one per weapon to one per ship which is dumb but it helped, although the problem was still pretty bad.
The problem is that I’ve never managed to reproduce it (it always ran fine for me) and I’m sure his PC isn’t the problem (he has an i5ish Xeon and a R9 280) and the sounds were buffered into the game and not streamed.
The tutorials never mention this, but am I supposed to make my own thread to play sound somehow? I can’t really see how that’d work though since the nodes have to actually be attached to the scene graph and fired from the rendering thread…
Oh, I haven’t thought of that, perhaps simply updating the drivers could work.
Btw how performace heavy are the audionodes for like 2 second .wav playbacks otherwise? I’m still not quite sure if I should use them super sparingly or is having a few hundred around alright?
There is a limit to the number of channels that will play at once. I don’t know what happens if you exceed it. 64 sticks in my mind but that’s just a guess-memory.
Hmm, Minecraft is on that list and he never had any problems with that. If I were to speculate I’d say they have an audionode attached to nearly every entity, which brings it to A LOT of audionodes.
Well i said it never happened on my tester’s pc, not in general. But that is quite interesting, I wonder if it was the same problem and how they fixed it.