On using outboard audio output

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Mr Alternative
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 22, 2017 11:18 am
Contact:

On using outboard audio output

Post by Mr Alternative »

After playing Factorio for some months now, I've always used my desktop computer, which also happens to be set up for low-latency audio recording/playback via a firewire recording interface. Of course I use my audio interface for general purpose playback and, of course, for Factorio.

The issue is that when running audio from Factorio through the audio interface, it can experience an intermittent loss of Firewire connection, before Windows redetects the interface (I can see this thanks to the indicator light on the front panel).

Obviously, whatever sound that had been playing at the time will cut out for a variable length of time. However, it is non-existant from the stone ages to roughly mid-game (sub-megabase). Once mega-base sustaining logistics become involved and UPS begins to be hit, stutters begin. So it's primarily a late game issue and, sadly, affecting my bobs/angels marathon game.

I have attempted to 'trick' Windows into outputting sound to my TV by selecting the HDMI audio output in the OS Sound properties before starting Factorio; going so far as to load a save up, then switching audio outputs to the interface, to no avail. Typical working latency buffers on the interface settings side (256-512ms) don't run into stutters until mid-game, at which point raising the buffer to 1092ms alleviates the issue until late-game megabases are involved.

To be clear, I play with a heavily modified version of Factorio primarily, but I have experimented with 0.15v saves at megabase scales running base Factorio SP, as well as my current marathon game.

So before I continue with my thoughts as to a cause, here's my system specs:

OS: Windows 10 Home 64-bit Build 16299
CPU: i7 4790K 4.4Ghz
RAM: 16GB 2400Mhz DDR3 @ 2x 8GB
MB: MSI Gaming 5 Z97
GFX: MSI Nvidia GTX 970 4GB @ 3840x2160 @ 60hz native
Firewire interface: VIA VT6315/VT6330 chipset PCI Express card* @ 8x speed
Audio interface: Focusrite Liquid Saffire 56 Firewire

*There are known issues with a number of Firewire chipsets (VIA included) and Windows 10, especially in a recent update to W10.

Here's the support page concerning Firewire support and Windows 10. It's a long, very interesting read about various chipsets by VIA and Texas Instruments requiring you delve into the world of antique drivers, but I'll give you the cliffs notes version as it relates to my particular setup:

At the time that I bought the interface, I had been using windows 8.1, which itself had issues with Firewire (USB was still growing as a data-transfer standard for audio interfaces in the industry at the time, and if it ain't totally broke, don't fix it in my case). The tool supplied on the support page lists my VIA-designed chipset as being compatible, but I've forced W10 to use drivers from 2007 (Vista-era, for those without a History of Microsoft Windows textbook handy).

It isn't entirely lost on me that technical issues such as this are edge cases in the world of development bugs. Indeed, I was going to solve this problem for myself in some round-about way, which is currently just listening to music through my iphone connected to an input the interface, running 'headless' on the audio interface (no FW connection). Inconvenient, but does the trick.

That is, until I noticed today that Factorio seems to use Direct Sound for audio routing, as opposed to Windows Audio Session (WASAPI) in Factorio-Current's output. Normally, DirectSound is just fine for games and mainstream audio interfaces (the integrated kind) and, to an extent, general audio playback. That is, until multiple audio streams become involved, and Direct Sounds' mixing and added latency don't tend to play well; then add in audio drivers (ASIO) that don't care for latency and...you get the picture.

I'm hoping that it is an 'easy' fix, or perhaps something that I've overlooked in the Factorio config file, or could be implemented, to set which source to send Factorio's audio internally via text editing the config file. Ideally, I'd love to set it to the interface directly (Saffire ASIO), but even WASAPI would suffice, being the more modern choice compared to DS.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: On using outboard audio output

Post by posila »

Hi, thanks for the post.
We have dropped support for Windows XP just this year, so that was reason why the game was built using Direct Sound in the first place. Unfortunatelly, we don't support any other audio interface on Windows. Good news is that we plan to migrate to more modern sound library - most likely FMOD. Bad news is that it won't happen until 0.17

Mr Alternative
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 22, 2017 11:18 am
Contact:

Re: On using outboard audio output

Post by Mr Alternative »

Hi posila,

Thank you for your time replying to this issue.

The requirement to use DS for XP support makes complete sense, and upon researching FMOD in more detail, I'm sure it'll solve my audio issues, as well as a few related issues I've read about on this forum (though mainly affect laptop users it seems), by the time .17 rolls around.

However, if in future I continue to have some issues I can't resolve myself after a new sound implementation is completed, or even find a solution myself, I'll publish it here for posterity.

Post Reply

Return to “Technical Help”