Aloshi / EmulationStation

A flexible emulator front-end supporting keyboardless navigation and custom system themes.
MIT License
2.06k stars 905 forks source link

No menu sound effects on boot #130

Closed dVerge closed 10 years ago

dVerge commented 11 years ago

First, I just want to say a big thank you to everyone involved! I just finished converting a broken SNES to a fully functional retro gaming system with working controllers, power/reset switches, etc., and I couldn't have done it without piecing together all the hard work this community has put in.

So, everything is working great, except one minor annoyance:

When ES first loads up, the sound effects (e.g. menu scrolling, start game) do not play. The sounds will only play after launching an emulator, then quitting and returning to ES.

Any ideas?

Thanks ahead!

Aloshi commented 11 years ago

Could you start ES, run and exit a game, then close ES and post the ~/.emulationstation/es_log.txt log file?

It sounds like for some reason audio is failing to initialize the first time.

dVerge commented 11 years ago

Done as requested, but there doesn't seem to be anything in the log related to sound...

lvl2: Starting SDL... lvl2: Creating surface... lvl2: Resolution: 1024x768... lvl2: Created surface successfully! lvl2: Loaded fonts successfully. lvl2: Loading system config file... lvl2: Finished loading config file - created 4 systems. lvl2: Loading theme "/home/pi/.emulationstation/mastersystem/theme.xml"... lvl2: Theme loading complete. lvl2: Loading theme "/home/pi/.emulationstation/megadrive/theme.xml"... lvl2: Theme loading complete. lvl2: Loading theme "/home/pi/.emulationstation/nes/theme.xml"... lvl2: Theme loading complete. lvl2: Attempting to launch game... lvl2: /home/pi/RetroPie/supplementary/runcommand/runcommand.sh 1 "retroarch -L /home/pi/RetroPie/emulatorcores/fceu-next/fceumm-code/fceumm_libretro.so --config /home/pi/RetroPie/configs/all/retroarch.cfg --appendconfig /home/pi/RetroPie/configs/nes/retroarch.cfg /home/pi/RetroPie/roms/nes/1942\ (JU)\ [!].nes" lvl2: Starting SDL... lvl2: Creating surface... lvl2: Resolution: 1024x768... lvl2: Created surface successfully!

Aloshi commented 11 years ago

Well, that's strange - it sounds like everything is initializing fine. Press your menu button and go into Settings and try increasing the "System volume" slider (this slider controls the OS volume for the entire system).

dVerge commented 11 years ago

Sorry for the delay. When I press my menu button, the only options I have are restart, shutdown, reload, and exit.

Aloshi commented 11 years ago

It sounds like your version of EmulationStation is pretty out of date, then. Update it with either RetroPie or git pull && cmake . && make.

dVerge commented 11 years ago

I tried updating using both methods. Both completed successfully, but I don't see any changes to ES. I still have the same four menu options; no option for settings.

It might also be worth mentioning that I do not have the es_settings.cfg file in /.emulationstation. I only have es_input.cfg and es_systems.cfg. Could this have something to do with it?

billipo commented 11 years ago

I have had this happen to me a couple times. I think it happens to me whenever I overwrite the theme folders. When I reboot there are no menu sounds at all. Hope this provides a clue.

dVerge commented 11 years ago

@billipo Anything helps! So, when this happens to you, do the sounds start working again at some point? If so, do you happen to remember anything you did that may have got them working again?

billipo commented 11 years ago

Nah. Unfortunately, I didn't get them working after they stopped without reimaging. I'm not crazy about either of them, so I haven't put time into restoring them. I would like to replace them in the future, but I'm not sure how to do that either. Sorree!

dVerge commented 11 years ago

OK, I'm not sure what I did wrong the first time, but I rebuilt again with cmake and now I have the updated version with the settings option in the menu. Still no sound on boot though....

Aloshi commented 11 years ago

If you close EmulationStation completely (press F4) then start it again from the terminal by typing emulationstation, do sounds work immediately?

dVerge commented 11 years ago

Nope. The sounds will only work after returning to ES from an emulator.

I tried playing around with some of the settings in AudioManager.cpp and retroarch.cfg, thinking there might be some conflict with driver or something, but no luck. Do you think @billipo could be on to something with the themes?

dVerge commented 11 years ago

Quick update: Interestingly, I found that if I force VGA mode in /boot/config.txt by uncommenting the following... hdmi_group=1 hdmi_mode=1 ...the menu sounds work on boot! I'm not sure what that tells me yet, and I don't know if I want VGA mode, but it's a start. I'm going to mess around some more and see what I can find...

Edit: After reading up on the following threads, I think i got it!

http://elinux.org/RPiconfig http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5851 http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062

What I learned was that if I leave the two settings mentioned above commented, the pi will talk to the TV on boot and get info on the native resolution, etc. over the EDID block (thats great because I want to use the pi on different TVs without updating boot/config.txt every time)

If I comment those out, however, I lose the sound again. So, to get the sound to work, I found that I had to set hdmi_drive=2. That forces "normal HDMI mode" as opposed to DVI mode. Why was the pi defaulting to DVI mode? I'm not sure yet.

Long story short, the sounds are working in ES on boot now! My best guess is that the emulators or RetroArch change the HDMI settings when they are started, explaining why the sounds would work when I return to ES after playing a game.

Hope this helps anyone else having the same issue.

Thanks again @Aloshi for your help and for this excellent front-end!

SuperSirLink commented 10 years ago

Just wanted to add, I had this same thing happening and changed the hdmi_drive=2 setting as well and I get sound on boot...

RetroMarine commented 10 years ago

I tried to edit in /boot/config.txt from cyberduck and it said I didn't have permissions. How do I get around that?

nilsbyte commented 10 years ago

@RetroMarine you have to edit this file as root using sudo in terminal

sudo nano /boot/config.txt

It seems that changing the config.txt solves the problem.

surtarso commented 8 months ago

I have this same problem, navigation sounds only work after I enter a game than leave to ES. I am on a PC tho, so I dont have a config.txt, also, im on a laptop so no HDMI input problem for me. I DO get this after a fresh boot: Feb 05 11:32:58 lvl2: req sound [video.launch] Feb 05 11:32:58 lvl2: (missing) But as stated... after I enter a game and go back to ES, the navigation sound magically works.

I am using my own theme, as follows https://github.com/surtarso/es-theme-urcade