TeamRizu / OutFox

The Bug Reporting Repository for OutFox LTS 0.4, Alpha V and Steam Early Access Builds
https://projectoutfox.com
Apache License 2.0
178 stars 3 forks source link

[BUG] Stopped notechart, audio lost on Raspberry Pi OS #352

Open bcdefg123 opened 3 years ago

bcdefg123 commented 3 years ago

*Please give System Info

OS: Raspberry Pi OS 64-bit

Model: Raspberry Pi 4B w/ 4GB RAM

Storage: 32 GB SD Card

Please give your StepMania Info

StepMania Version: Alpha 4.9.8 Theme: Soundwaves 4.9.8

Describe the problem

In the middle of songs (usually early on in songs where it happens), the notes will suddenly jerk up and down for a bit, effectively making the notechart freeze, and the sound will completely vanish. The notes on screen will occasionally change suddenly and the jerking in place will resume. I can cancel out of the song, but all menu sound is absent as well, both songs and SFX.

After it happens, I can exit and restart Stepmania, and play through the song again just fine.

This has happened at least three times for me.

I uploaded a video of the bug here (starting just after 0:35): https://youtu.be/_Jn4iiNOwX8

Describe what should happen

I should be able to play through the songs.

Logs and Additional context

info.txt log.txt

Scraticus commented 3 years ago

Your device is running on pulseaudio which is no recommended on the Pi, I note you had added the plughw:2,0 for your hdmi, but your device is on 2,1.

In the log the Driver: X, Device X, are the ones you need to use, this will stop pulseaudio from causing a cpu block and crashing your game.

00:01.245: ALSA Driver: 0: bcm2835 Headphones [Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones], 8/8 subdevices avail 00:01.245: ALSA Driver: 1: vc4-hdmi-0 [vc4hdmi0], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0], 1/1 subdevices avail 00:01.245: ALSA Driver: 2: vc4-hdmi-1 [vc4hdmi1], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0], 1/1 subdevices avail 00:01.246: ALSA device overridden to "plughw:2,0"

There are issues with sound on linux, and i'm hoping to update these over the next week in time for the next alpha so they will be less of a chore in the future.

Let me know if setting the alsa sound fixes the stutter.

bcdefg123 commented 3 years ago

I changed SoundDevice to 'plughw:2,1'. It still occurred, just a tiny bit differently. This time, I cleared a song, and when I returned to the menu, there was no sound (instead of happening in the middle of a song). When I started up a new song, I experienced the same thing I did just after I captured that video in my initial post, where the note markers at the top occasionally ceased flashing for a while, there was still no audio, and I saw no notes.

I would also just like to note that occasionally OutFox crashes to my desktop as well without warning, and it has happened in songs, in options, and in menus. Seemingly randomly, in other words. It has also seemed to happen once or twice each session (the Pi is off when not used and turned on each session), about one or two songs between each crash, and then I can go for a longer run without issue. I didn't reference this issue yet because for all I know solving the main issue here would help with the crashing as well, and I wanted to see if the above info would be consistent over more playthroughs. But if that persists after this I can open a separate issue.

I am going on a week-long vacation starting tomorrow and will not be able to test until the 27th at the earliest, but I'll at least be able to read this thread.

bcdefg123 commented 2 years ago

So, I realized that I didn't really understand the earlier parts of this conversation as well as I thought I did, especially the pulse and alsa stuff. It took me some time to figure out how to disable pulse, but I did, and since then, OutFox has not crashed or had any audio bugs since when running sound just through alsa.

The trade-off is that to make this setup work, HDMI sound won't work as it did with pulseaudio and I need to plug in a set of speakers to the Pi to get sound instead. It appears it may have something to do with this, where the HDMI device is not controllable through alsamixer: https://github.com/raspberrypi/linux/issues/3953

I haven't delved into understanding the issue thoroughly yet, since the current setup with external speakers suffices for now.