Open Mangaclub opened 5 years ago
edit: only happens when loops is activated
OK, so this code used to work but now whenever a song ends and loop is true AM crashes. It's from the HyperPie2 theme:
////////////////
//Background Music
////////////
local bgMusic = fe.add_sound("")
if ( my_config["enable_backgroundmusic"] == "Per Title" ) {
function bgmusic_transitions( ttype, var, ttime ) {
switch ( ttype ) {
case Transition.FromOldSelection:
bgMusic.playing=false
bgMusic.file_name = "../../music/"+fe.game_info(Info.Title)+".mp3"
bgMusic.playing=true
bgMusic.loop=true
break;
case Transition.ToGame:
case Transition.StartLayout:
bgMusic.playing=false
bgMusic.file_name = "../../music/"+fe.game_info(Info.Title)+".mp3"
bgMusic.playing=true
bgMusic.loop=true
break;
}
return false;
}
fe.add_transition_callback( "bgmusic_transitions" );
}
if ( my_config["enable_backgroundmusic"] == "Per Display" ) {
function bgmusic_transitions( ttype, var, ttime ) {
switch ( ttype ) {
case Transition.ToNewList:
bgMusic.file_name = "../../music/"+fe.list.name+".mp3"
bgMusic.playing=true
bgMusic.loop=true
break;
}
return false;
}
fe.add_transition_callback( "bgmusic_transitions" );
}
Please use a markdown for code snippets. https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code
System: Raspberry Pi 3 OS- Retropie Attract mode 2.5.1 linux is up to date Theme used: AMGPS_Menu
After palying a music as background music in the titlescreen attract mode crashes with a acces violation error when the music finished playing.
It sure is Theme related but worth a look into