Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Loose all sound when switching  (Read 575 times)

sgtnasty

  • Ensign
  • *
  • Posts: 2
  • I was never born, so I will never die.
    • View Profile
    • sgtnasty
Loose all sound when switching
« on: July 26, 2021, 03:26:33 PM »

Running on Arch Linux and KDE Plasma
Code
$ uname -a

Linux thinkpad 5.13.4-arch1-1 #1 SMP PREEMPT Tue, 20 Jul 2021 16:58:51 +0000 x86_64 GNU/Linux
$ cat /proc/meminfo
MemTotal:       32289708 kB
MemFree:        16311636 kB
$ cat /proc/cpuinfo
 model name      : Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz

cpu MHz         : 2600.000
cache size      : 9216 KB



When I switch to another application the sound in starsector stops working, All other apps have no issues.
For some reason If I change the volume up or down the windows switches from starsector back to the desktop
then i loose sound
Logged
- Like tears in the rain

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Loose all sound when switching
« Reply #1 on: July 27, 2021, 04:42:42 PM »

Hi - I'm sorry about the trouble, and the delayed response!

The only thing that comes to mind is that something is causing the sound device/driver to re-initialize on your system when this happens. Unfortunately the game doesn't handle this scenario (more easily reproduced by, say, starting the game with headphones plugged in and then unplugging them); it's something I'd like to look into it's some point but it's fairly involved.

Not sure what to suggest as far as fixing this on your end, though; apologies.
Logged

sgtnasty

  • Ensign
  • *
  • Posts: 2
  • I was never born, so I will never die.
    • View Profile
    • sgtnasty
Re: Loose all sound when switching
« Reply #2 on: July 27, 2021, 05:05:07 PM »

No worries, I appreciate the reply. If there is any debugging I can do on my end I would be happy to help out. Perhaps try another JRE?
I am going to watch the journal and try to see if something like you described is shown and will post my results here.
Logged
- Like tears in the rain

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Loose all sound when switching
« Reply #3 on: July 27, 2021, 06:07:46 PM »

I suppose trying another JRE couldn't hurt - you'd have to modify starsector.sh to point to whichever java you want to use.

What you're describing regarding changing the volume switching from Starsector back to the desktop makes me think there is probably some kind of system setting (or perhaps issue?), though, that definitely doesn't sound normal. So e.g. something like trying a different set of sound drivers or adjusting the OS sound settings might be worth a shot, too.
Logged

Vind

  • Admiral
  • *****
  • Posts: 784
    • View Profile
Re: Loose all sound when switching
« Reply #4 on: July 28, 2021, 12:16:25 PM »

On my linux system with KDE plasma:
    Launcher fullscreen mode - game mutes sound/music on alt-tab as game "window" is auto-minimized to task manager tray upon losing focus
    Launcher windowed mode with resolution less than whole screen - game sound/music still work on alt-tab as game window remains open on alt-tab switch

So this this is default behavior and other OP programs just use windowed mode of operation.
The quick "sound fix" for this is to launch game in windowed max resolution mode but taskbar will be visible on top of game window. To hide taskbar you can set "keep above others" flag on application window but then you cant see other application windows on alt-tab unless flag is unset back.

I realize this is not very helpful but unless im missing something it works as it should.
Logged