Aloshi / EmulationStation

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

Theme Sound FX not working #215

Open giantalbi opened 10 years ago

giantalbi commented 10 years ago

Hi, i was trying to add the old menu sound into the 'simple' theme. So in the simple.xml file, I put the sound tag in the root of the <theme> tag like this

<theme>
        <menuScrollSound>~/.emulationstation/themes/sounds/GS25.wav</menuScrollSound>
        <menuSelectSound>~/.emulationstation/themes/sounds/GS42.wav</menuSelectSound>
        <menuBackSound>~/.emulationstation/themes/sounds/GS28.wav</menuBackSound>
        <menuOpenSound>~/.emulationstation/themes/sounds/SNES5.wav</menuOpenSound>

    <formatVersion>3</formatVersion>

    <view name="system">

        <image name="background" extra="true">
            <size>0 1</size>
            <pos>0.5 0.5</pos>
            <origin>0.5 0.5</origin>
        </image>
    </view>

    <view name="basic, detailed">

        <text name="md_lbl_rating, md_lbl_releasedate, md_lbl_developer, md_lbl_publisher, md_lbl_genre, md_lbl_players, md_lbl_lastplayed, md_lbl_playcount">
            <color>393a3b</color>
            <forceUppercase>1</forceUppercase>
            <fontPath>./art/OPENSANS-LIGHT.TTF</fontPath>
            <fontSize>0.03</fontSize>
            <size>0.12 0.04</size>
        </text>

        <text name="md_rating, md_developer, md_publisher, md_genre, md_players, md_playcount">
            <color>393a3b</color>
            <forceUppercase>1</forceUppercase>
            <fontPath>./art/OPENSANS-LIGHT.TTF</fontPath>
            <fontSize>0.03</fontSize>
            <size>0.14 0.04</size>
        </text>

        <text name="md_description">
            <color>393a3b</color>
            <forceUppercase>1</forceUppercase>
            <fontPath>./art/OPENSANS-LIGHT.TTF</fontPath>
            <fontSize>0.03</fontSize>
        </text>

        <datetime name="md_releasedate, md_lastplayed">
            <color>393a3b</color>
            <forceUppercase>1</forceUppercase>
            <fontPath>./art/OPENSANS-LIGHT.TTF</fontPath>
            <fontSize>0.03</fontSize>
            <size>0 0.04</size>
        </datetime>

        <image name="header" extra="true">
            <pos>0 0</pos>
            <origin>0 0</origin>
            <size>1 0.16</size>
            <path>./art/bright.png</path>
        </image>

        <image name="footer" extra="true">
            <pos>0 1</pos>
            <origin>0 1</origin>
            <size>1 0.065</size>
            <path>./art/bright.png</path>
        </image> 

        <image name="background">
            <pos>0 0</pos>
            <origin>0 0</origin>
            <size>1 1</size>
            <path>./art/mid.png</path>
        </image> 

        <textlist name="gamelist">
            <selectorColor>393a3b</selectorColor>
            <selectedColor>97999b</selectedColor>
            <primaryColor>393a3b</primaryColor>
            <secondaryColor>000000</secondaryColor>
            <fontPath>./art/OPENSANS.TTF</fontPath>
            <fontSize>0.03</fontSize>
            <forceUppercase>1</forceUppercase>
        </textlist>

    </view>

    <view name="basic">
    </view>

    <view name="detailed">
    </view>

</theme>

When i select the theme set in EmulationStation (on my raspberry pi), no sounds are playing (i put them in the right directory).

nilsbyte commented 10 years ago

Can you post details regarding that WAV files? If you don't know how, just upload the WAVs somewhere and let me check.

giantalbi commented 10 years ago

I took them on an old retroPie theme https://www.dropbox.com/home/Public/RetroPie/sounds

nilsbyte commented 10 years ago

You are using it wrong, the theming system has changed since version 2.0. The sound tag is now a property of the textlist element. Look here: https://github.com/Aloshi/EmulationStation/blob/unstable/THEMES.md

You have to add <scrollSound>~/.emulationstation/themes/sounds/GS25.wav</scrollSound> inside the <textlist> element.

I just tried it by myself. It works but only after the third key press when scrolling through the game list.

The other tags from your XML <menuBackSound> <menuOpenSound> <menuSelectSound> don't exist any longer. I think it would be good to be able define sounds for the carousel (system select) and the menu, as well as a select and a execute-sound for each of them @Aloshi.

If it doesn't work, it's possible that you have the same issue as described here: https://github.com/Aloshi/EmulationStation/issues/130

Try to launch a game and quit it. Are the sounds playing now? Also try to change the values in config.txt as described in https://github.com/Aloshi/EmulationStation/issues/130 - be sure to choose the right number matching to your screens resolution. Documentation here: http://elinux.org/RPiconfig#Video_mode_options