No sound when launching via cmd line

Hi all, hope someone can help me out here!

Brief issue : I have a rather advnaced audio setup on my PC, and while fixing my recording capabilities I’ve now got an issue where: Anytime I launch any RetroArch game via cmd line (e.g. using Launchbox) the audio does not work (any core, any game). However if I launch RetroArch.exe alone and then use the history to launch a game (or go to a core then load a game I haven’t played before) the audio works perfectly.

Extended Setup Info: The core pieces to understand here are:

  • I’m using Voicemeeter Potato and EarTrumpet (MS App) to route audio per-app through various interfaces

  • Using an XLR mic and USB audio interface (thus the need for Voicemeeter) to record audio

  • Using standard USB headset for audio out

  • Using Nvidia ShadowPlay to record video/desktop sound

For anyone not familiar with the above, I effectively have control over the audio routing for every individual application on my PC, so that I can stream or record and only capture what I want (e.g. I could play Spotify music that only I can hear, but stream/record my in-game sound and mic). Same example with streaming while watching Youtube, I set Chrome to pipe straight to my headphones so that any stream viewers cannot hear the audio, etc.

Now, this setup can be rather complex and taxing on the brain, but it works, and as far as I can see/test it’s now setup and shouldn’t have anything to do with the issues I’m seeing - just worth noting as this issue didn’t start until I was troubleshooting why I couldn’t capture game audio.

What I’ve done: To get ShadowPlay capturing game audio I had to ensure it (‘NVIDIA Container’ in app volume device settings, when it’s running) was set to take an INPUT of the Voicemeeter output channel I use for desktop audio (not chrome/music) and an OUTPUT of Voicemeeter input channel. So when I open a game the audio path goes GAME > VOICEMEETER OUT > SHADOWPLAY IN > SHADOWPLAY OUT > VOICEMEETER IN > VOICEMEETER OUT > SPEAKERS (Headset). The Voicemeeter interface is just an I/O in the app, but Windows picks it up as separate in/out - which it should.

I’ve also gone through RetroArch options, however the exact same config if used whether it’s launched with or without cmd line (Launchbox), so I’m starting my search for a fix here.

Please Help :slight_smile:

Now, back to my issue here… prior to reconfiguring I had sound in RetroArch when launching from LaunchBox but no sound in my recordings. Now I’ve fixed the sound in recordings but I only get sound in game if I open RetroArch and then the game I want. So I’m hoping someone has more advanced knowledge than me to help figure out why launching via cmd line would break the sound.

Thanks in advance!

The 2 things I would double-check are: make sure it’s definitely using the same config both on its own and with launchbox, and make sure the application is actually producing sound when it should be (that is, look for activity in your audio routing, etc.)

Thanks mate :slight_smile:

I took Launchbox out of the equation and tested using straight cmd line (using below) with the same results.

retroarch.exe -L "L:\Launchbox\Emulators\RetroArch\cores\genesis_plus_gx_libretro.dll" "L:\Launchbox\Games\Sega Master System\Wonder Boy in Monster Land (USA, Europe).sms"

But if I simply open RetroArch and then use the UI to select a core/game, no issues.

Re: Audio routing, if I open RetroArch alone then yes I get the audio routing through Voicemeeter and can see it, if I open it via cmd line with the arguements to load core and ROM then the sound doesn’t come through at all.

Additional note: I can open retroarch.exe with cmd line and load core/file myself and it works fine. The issue seems to occur specifically when arguements are added for core/ROM.

I continued testing more and more after this post so I’ll put those discoveries below. Winding back on when it was working Vs when it was not: the actual change made was to the in/out sound options for Nvidia ShadowPlay (which detect RetroArch and can capture it, but that was always the case regardless of wether or not ShadowPlay recorded the sound or not. I can see in the sound options that different cores present as different application names (in terms of audio routing), however these have all been set identically (which is to output to the correct route) and don’t change between RA working and not working.

Further tests/info:

  • Retroarch and all cores updated fresh to latest versions. NO CHANGE

  • Opening retroarch.exe via cmd line without core/rom switches. SOUND WORKING

  • Opening retroarch.exe via cmd line with core/rom switches. NO SOUND

  • Opening retroarch.exe via cmd line with core/rom switches and then using history to open a different rom (same or different core) OR closing content and picking any other rom. SOUND WORKING

Info I don’t have is if using history to open another rom for the same core unloads the core and then reloads it or not, or if the GUI is using similar cmd line switches behind the scenes to do the tasks I’m selecting in the menu. I’ve tried this with a number of cores and roms from the cmd line and it looks like the audio is failing on startup, but I don’t need to close Retroarch to get it working again… I just need to change core/game.

I’m not dismissing the fact my sound routing could be the issue, and likely is, however that is both extremely inconvenient to un-do and ultimately to have a workable setup it needs to be how it is (e.g. having my mic and headset working with video conferencing (Zoom, Teams, Zoho), Streaming (OBS), ShadowPlay (recording gameplay for retro and modern games), etc). If it’s between using the workaround for RA sound and undoing my entire sound config, I’ll just have to live with working around the RA issue, but if anyone has alternative options feel free to let me know :D

I would love to have everything working solidly.

The GUI doesn’t do CLI stuff in the background, no.

Thanks :slight_smile: Well however the GUI is switching roms (e.g. If I chose a game from recent history) is resulting in fixing the issue. I don’t know if that helps the troubleshooting or not :slight_smile:

Possibly worth noting that for troubleshooting I enabled menu sounds, and they suffer the same fate as the rest of the audio. They don’t work on cmd line launch when core/rom switches are used, but come back to life once the core/rom is switched.