Javanaise/mrboom-libretro

Sound issues, muffled bursts - SteamOS

Closed this issue · 26 comments

I cannot get sound to go beyond muffled bursts. Sound effect works fine. SteamOS uses Pulseaudio. HDMII out device. Music is just a burst ever so often, muffled static. Build target is standalone, not libretro. Used laster master tree.

Details:

HDA Nvidia
Digital Stereo HDMI output

lspci:

01:00.1 Audio device: NVIDIA Corporation Device 10f0 (rev a1)
        Subsystem: eVga.com. Corp. Device 6286
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: snd_hda_intel

lsmod

desktop@steamos:~$ lsmod | grep snd
snd_hda_codec_hdmi     53248  1 
snd_hda_codec_realtek    81920  1 
snd_hda_codec_generic    65536  1 snd_hda_codec_realtek
snd_hda_intel          28672  7 
snd_soc_rt5640         86016  0 
snd_hda_controller     28672  1 snd_hda_intel
snd_hda_codec          94208  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_soc_rl6231         16384  1 snd_soc_rt5640
snd_hda_core           24576  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_controller
snd_hwdep              16384  1 snd_hda_codec
snd_soc_core          151552  1 snd_soc_rt5640
snd_compress           20480  1 snd_soc_core
snd_pcm                90112  7 snd_soc_rt5640,snd_soc_core,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              28672  1 snd_pcm
snd                    69632  23 snd_hda_codec_realtek,snd_soc_core,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_compress
soundcore              16384  1 snd
regmap_i2c             16384  1 snd_soc_rt5640
snd_soc_sst_acpi       16384  0 

I fixed something, and also added a new command line option:

-f <x>, --fx <x> FX volume: from 0 to 10

Could you try again and let me know what works for you ? (Default fx volume is 5)

Hello, any update?

I was aware for several days. I can check this tonight when I do some other work on my other projects.

Had a bit of crisis with my package pool tonight. I built the package and will test tomorrow.

By default now, the item pickup SFX is fine, bombs cause muffled bursts, and there is no background music. Also, why a single dash for one argument, but two for the other? A very minor issue, but there are black bars on the sides. The image is not stretched, but is not 4:3 either.

Tried steam launch options:

# about the same
-f 5 --fx 5 

#  Quieter but not whisper quiet ad a level of 1 suggests
# Still no background music
-f 10 --fx 1

There is no music yet.
All arguments can be called either with 1 dash + 1 letter or with 2 dash + their long name.
Do you find it muffled when several bombs explode at the same time or even with one bomb ?
The sound FX are pretty low quality, but it's also quite likely that I'm not using the SDL2 mixer properly.
I'm not sure about the black bars, I'm don't see them on mac OS X when going full screen, neither on Raspbian when running from the console... What's your resolution and screen ratio ?

I can snag a screenshot via Steam BPM I think. As for the bombs, each single bomb. 16:9 LCD at 1920x1080. HDMI.

@mdeguzis can you upload a screenshot ?
@ehaupt @alexmyczko Any clue about the black bars ?

Sorry I didn't get back to you in time, oh well. Guess I'll just wait for updates if you're going to close tickets early.

This issue was going in too many directions, I guess the sound issue can be closed.
Please open a different issue about the black bars that includes a screenshot...

Actually this is not fixed. the sound is completely broken on Linux. it runs at half speed compared to OSX.

@mdeguzis Could you please try the current master and let me know for the sound ?
You may need libmodplug-dev and libsdl2-mixer-dev to compile...

Hello, any update?

I don't understand where the affinity for closing posts early comes from. I had an emergency. Trying latest source now.

@mdeguzis I like clicking buttons ;)

@mdeguzis
BTW do you have an idea how to fix the makefile so that "make mrboom" would be doing the same than "make mrboom LIBSDL2=1" ? This target is only used for the SDL2 version...

You can set the default at the top of the makefile. See https://www.gnu.org/software/make/manual/html_node/Setting.html

e.g.

LIBSDL2 ?= 1

Should set LIBSDL2 var to 1 or whatever value, if* it is not set by the user. That would effectively make it the default for 'make mrboom'. This would negate the CFLAGS += -D__LIBRETRO__ option though, but setting LIBSDL2="" may equate to "False". You could always require "LIBSDL2=ON" or "LIBSDL2=OFF" and set the default to ON.

LIBSDL2 ? = ON

ifeq ($(LIBSDL2),"ON")
CFLAGS += -D__LIBSDL2__
LDFLAGS += -lmodplug -lSDL2 -lSDL2_mixer -lminizip -lz
else
CFLAGS += -D__LIBRETRO__
endif

But this would change running "make"
How do I get LIBSDL2 set when running "make mrboom" and LIBRETRO set when running "make" ?

mrboom is just a target, you can set the variable under there.

mrboom: $(OBJECTS)

Just how you have that rely on the objects variable def, have it rly on the LIBSDL2 def, or have it rely on a another section that set it

setsdl2:
     <CODE>

mrboom: setsdl2 $(OBJECTS)

The lines after a section should be what it relies on, from what I always understand. I do this in Makfiles for docker Makefiles I construct at work. If a target has dependent objects after the label, those are ran first. Otherwise, it runs the code that is indented underneath.

make restart: stop cleanup start

if I do that

diff --git a/Makefile b/Makefile
index 6bc3739..fae14dc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 #libretro-buildbot
+setSDL:
+       LIBSDL2=1
 
 STATIC_LINKING := 0
 AR             := ar
@@ -225,7 +227,9 @@ endif
 testtool: $(OBJECTS)
        $(CXX) $(fpic) $(OBJECTS) -o $(TARGET_NAME)-test.out $(LDFLAGS)
 
-mrboom: $(OBJECTS)
+
+
+mrboom: setSDL $(OBJECTS)
        $(CXX) $(fpic) $(OBJECTS) -o $(TARGET_NAME).out $(LDFLAGS)

It doesn't work, the LIBSDL2 variable is set too late, could try to call a "make command" inside the mrboom target but that sounds bad...

any clue @mdeguzis ?

I'll see if I can test this weekend. Have some Docker work to do first. No problem helping out, just have to be patient :)

Hi @mdeguzis Michael, could you test the current master to let me know how it behavs under linux when you resize the window or go full screen ?

With SteamOS the compositor acts in "full screen" view all the time, even if you set an option to be windowed. As weird as it sounds, it behaves like a console should, I don't have to deal with it. I won't be able to test that part.