User Tools

Site Tools


background_music

Setting ambient Background Music

You can play/loop a long background ambient mp3 that will always play during Popper FrontEnd. NOTE: it will not stop/pause if you have other video/audio files in the frontend. It will pause when you play a game/table and resume when you return.

THIS IS ADVANCED PinUP USERS ONLY. NO SUPPORT PROVIDED.

1> backup your PUPMenuScript.pup file in pinupsystem folder.

2> copy bgmusic.mp3 to your pinupsystem folder root. (simple to just rename whatever mp3 you have to bgmusic.mp3)

3> now you need to modify the script file pupMenuScript.pup

find function startup. add the lines to look like this: note you can set the volume(1-100) on the setvolume line.

function StartUp() {    //startup menusystem
    Setuplabels();
    DOFStart();
    DMDStart();
    WEBStart();

    //background music
    PuPlayer.Init(15,"PinUPMenu");
    PuPlayer.setVolume(15,100);
    PuPlayer.play(15,"bgmusic.mp3","");
    }

find function GameLaunch. need to just add the one line PuPlayer.playpause(15); at the bottom of function like this:

  function GameLaunch(pMsg) {
    try {
    var js = eval('obj = ' + pMsg);
    } catch(e) {return;}

    if (pGameInfo>-1) {PuPlayer.LabelShowPage(pGameInfo,0,0,"");}

    DOFClose();

    var kdisplay = js.GKeepDisplays.toString();
    if (kdisplay.indexOf("1")==-1 || kdisplay.indexOf("-1")>=0) {DMDClose();}

    PuPlayer.playpause(15);

    }

find function MenuReturn and just add the one line PuPlayer.playresume(15); at the end like this:

    function MenuReturn(pMsg) {
    DOFStart();
    DMDStart();

    if (pGameInfo>-1) {
        //PuPlayer.LabelShowPage(pGameInfo,1,0,"");
        PuPlayer.SendMSG("{'mt':301, 'SN':  "+pGameInfo.toString() + " , 'FN':3, 'OT':1 }");
        }

    PuPlayer.playresume(15);
    }
background_music.txt · Last modified: 2019/07/19 17:41 by pinupadmin