Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music player doesn't fade. #17

Open
particle1123 opened this issue Nov 12, 2020 · 5 comments
Open

Music player doesn't fade. #17

particle1123 opened this issue Nov 12, 2020 · 5 comments

Comments

@particle1123
Copy link

RPI 4B 4GB, 128GB Samsung EVO Select SD
RetroPie v4.7.1 - my own build using this image, not some prebuild image etc...

I have installed the music player. Everything works except the fade. When I start a game the music abruptly stops. Also, if I make changes to the volume in the setup screen it returns a message:

amixer: unable to find simple control 'pcm',0

Other than this, it works great. Please help, I've spent hours trying to resolve this.

@Exarkuniv
Copy link

since he is no longer working on this. i dont think it will be fixed.
it is a issue since the audio drivers changed from the Pi3 to the Pi4.

till someone who knows what they are going takes a look at the script. i think we are SOL.
if you want fade i know that mpeg123 that cyperghost on the retropie forum has posts on how to do it. and i think it works on the pi4

@thesickkness
Copy link

thesickkness commented Jan 2, 2021

@particle1123

//UPDATE Just tested this fix with a Pi4. I didn't have to fix the mixer elements error.

Edit:
/home/pi/RetroPie-BGM-Player/bgm_system.sh

Change:
readonly CHANNEL=“PCM”
To:
readonly CHANNEL="HDMI"


I had the same issue with a new build. Strictly using HDMI audio output, no headphones or anything.

On my new image of Retropie (base 4.7.1) I had to fix the audio first, as I was getting failed to find mixer elements errors:
Edit:
/opt/retropie/configs/all/emulationstation/es_settings.cfg

Change:
string name=“AudioDevice” value="xxxxx”
To:
string name=“AudioDevice” value=“HDMI”

Then the fix for the fade effect on BGM was simple:
Edit:
/home/pi/RetroPie-BGM-Player/bgm_system.sh

Change:
readonly CHANNEL=“PCM”
To:
readonly CHANNEL="HDMI"

My fade effect is working and I have zero audio errors. This is on a standard vanilla Retropie 4.7.1 build, 3B+.

Hope this helps some people.

@particle1123
Copy link
Author

@particle1123

//UPDATE Just tested this fix with a Pi4. I didn't have to fix the mixer elements error.

Edit:
/home/pi/RetroPie-BGM-Player/bgm_system.sh

Change:
readonly CHANNEL=“PCM”
To:
readonly CHANNEL="HDMI"

I had the same issue with a new build. Strictly using HDMI audio output, no headphones or anything.

On my new image of Retropie (base 4.7.1) I had to fix the audio first, as I was getting failed to find mixer elements errors:
Edit:
/opt/retropie/configs/all/emulationstation/es_settings.cfg

Change:
string name=“AudioDevice” value="xxxxx”
To:
string name=“AudioDevice” value=“HDMI”

Then the fix for the fade effect on BGM was simple:
Edit:
/home/pi/RetroPie-BGM-Player/bgm_system.sh

Change:
readonly CHANNEL=“PCM”
To:
readonly CHANNEL="HDMI"

My fade effect is working and I have zero audio errors. This is on a standard vanilla Retropie 4.7.1 build, 3B+.

Hope this helps some people.

Tried this and no luck. Worth knowing that in my situation my sound device is SYSDEFAULT, sound card is PCM and omx is BOTH. unable to change those settings for whatever reason

@thesickkness
Copy link

Tried this and no luck. Worth knowing that in my situation my sound device is SYSDEFAULT, sound card is PCM and omx is BOTH. unable to change those settings for whatever reason

My Sound Settings are:

Audio Card: Default
Audio Device: HDMI
OMX Player Audio Device: Both

@Rocketeer2001
Copy link

I created an account just to comment on my experience in case it helps others.

I have a Raspberry Pi 3B+ with a new Retropie 4.7.1 Buster build that I've been working on. Right out of the gate I had no sound. Nothing in Emulation Station or in games. I had all 3 of the symptoms described here:
https://retropie.org.uk/forum/topic/26628/audio-issues-after-latest-raspbian-updates-june-2020

  • Error messages showing when a game is launched (lvl0: VolumeControl::init() - Failed to find mixer elements).
  • Sound missing in EmulationStation and games.
  • System Volume slider stuck at 0% in EmulationStation's Sound settings.

I have an HDMI cable for video going to my monitor, but I'm using a 3.5mm headphone cable for the audio going to some computer speakers. Having this configuration in Retropie Stretch worked fine, but Buster is picky.

In the EmulationStation main menu I had to change my sound settings to be:
System Volume = 100%
Audio Card = Default
Audio Device = Headphone
OMX Player Audio Device = ALSA

Then I had to enter the Audio menu in the RetroPie Menu to set my Audio output to "Headphones".
This got sound working in both Emulation Station and in games, but now I would get an error when launching a game or entering a retropie menu that would say:
amixer unable to find simple control 'pcm'

A bunch of googling later and I realized that this BGM player was the culprit. The music was playing, but it didn't fade out smoothly when launching a game; it would just get cut off. When I toggled off this player in the settings, I no longer got that error about the amixer.

Part of that googling led me here, and after seeing the fix @thesickkness did, I figured I could give that a shot. I used WinSCP to access this location over the network:
/opt/retropie/configs/all/emulationstation/es_settings.cfg

Instead of replacing the audio device with 'HDMI', I Changed it to be 'Headphones' since that's what I had it set to in both EmulationStation Sound Settings and in Retropie Audio Settings:

string name=“AudioDevice” value="xxxxx”
To:
string name=“AudioDevice” value=“Headphones”

I also wanted to mimic this fix to get the fade effect working too, so I went to:
/home/pi/RetroPie-BGM-Player/bgm_system.sh

and changed:
readonly CHANNEL=“PCM”
To:
readonly CHANNEL="Headphones"

And just like @thesickkness my fade effect is working and I have zero audio errors popping up!

@particle1123 , you could try fiddling with the various sound settings in emulationstation menu (follow the directions in the link), and then setting your "AudioDevice" and CHANNEL to PCM and see if that makes it happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants