Jump to content
LaunchBox Community Forums

Troubleshooting Retroarch - no sound when launched via Launchbox (cmd line)


Recommended Posts

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 :)**

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!

Link to post
Share on other sites
11 hours ago, thraxlol said:

I effectively have control over the audio routing for every individual application on my PC,

...

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.

 

Yes, your setup is probably why it's not working. :)

Test 1: Disable everything you've customized with regards to sound routing and all third party sound patches.

Hypothesis on the result: Sound will work regardless of how you launch

You're hijacking app audio, so my guess is that your setup is seeing a different parent process when setting up its audio routing - that would explain the difference between launching Retroarch directly from Explorer versus from the command line (or scripted from another app).  Get to the bottom of what process is being detected and you'll likely find/fix your issue.

Edited by Pixelpiper
Link to post
Share on other sites

Cheers for the reply :) 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 have a thread on the Retroarch forums as well but so far no luck.

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. I'm ok with that, but if anyone has alternative options feel free to let me know :D

Link to post
Share on other sites

You say it works if you start RetroArch manually. For testing purposes you could make per core config files and load those with LaunchBox. Just start RetroArch manually, load a core and game. And if everything works, save a core config file.

2019921833_Schermopname(87).thumb.jpg.8441f0adea248e0564c9f9c44911ca4d.jpg

1187294265_Schermopname(88).thumb.jpg.fc09ab497fc2503027e285abea682b7f.jpg

The files are saved in the RetroArch config folder. Then tell LaunchBox to load those core config files when launching a game by adding: -c "config\core_name.cfg" to the platform/core in the "Extra command-Line Parameters" tab in the LaunchBox > Tools > Manage Emulators > RetroArch > Associated Platforms tab.

1778446927_Schermopname(83).thumb.jpg.9ef48593c5045c3926a385de7733d511.jpg

Of course I don't know if it solves your issues, but you could try.

Link to post
Share on other sites

It is, without question, the audio hijacking/routing. If percentages could go higher than 100, I'd be there.

For whatever reason, maybe even a bug in the software you're using to accomplish all this, something isn't triggering the correct profile/route when you first fire it up. If relaunching a core (a different process that has its own setting/profile) causes it to work, there's really no question it's the audio software.

You can check your active processes and watch them in real-time as you start/stop/restart Retroarch/cores.  I haven't used Windows as my everyday OS in a long time, so I can't recommend anything better than Task Manager, but I'm sure there's something else out there that might offer you more insight (if it's needed).

Have you searched to see if anyone else has has similar issues with processes  (apps/windows, etc. - nothing to do with Retroarch) not triggering the audio routes unless restarted?

Edited by Pixelpiper
Link to post
Share on other sites
1 hour ago, Pixelpiper said:

Have you searched to see if anyone else has has similar issues with processes  (apps/windows, etc. - nothing to do with Retroarch) not triggering the audio routes unless restarted?

Yes and no... it's something pretty hard to track down as most of it goes back to 'just set your app to the right audio route', which is the fix for most things. The vast sea of internet help forums and google don't make it easy to narrow down something as niche as this. I'm hoping to gain more insight into how RA switches cores on their forums, so far I've found the GUI doesn't use the CLI commands, so that's one thing I guess... 

I guess another issue here is that while I could identify the active processes in task manager etc, unless they show up in sound options for me to alter the route it doesn't do me much good; and all processes that I've found so far that do show up, I've changed (thus why the audio routing works, other than with CLI start).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...