Author Topic: was music loop crash ever solved?" solved  (Read 167 times)

jedione

  • Hero Member
  • *****
  • Posts: 713
  • punktoe
    • View Profile
was music loop crash ever solved?" solved
« on: May 25, 2019, 05:19:01 PM »
was music loop crash ever solved?

cant seem to find,  any info...  but it happens when using..

kind of old topic...but still revalant :-\

after song ends...
Code: [Select]
local mysong = fe.add_sound("music/music-3.mp3");
mysong.loop = true;
mysong.playing = true;
« Last Edit: May 25, 2019, 05:22:07 PM by jedione »
help a friend....

jedione

  • Hero Member
  • *****
  • Posts: 713
  • punktoe
    • View Profile
Re: was music loop crash ever solved?" solved
« Reply #1 on: May 25, 2019, 05:23:44 PM »
i new i  saw it somewere....

solved..... thought it would be nice to just be fixed

Code: [Select]
// [fe.sound.loop = true;] cause AM crash. I don't know the reason exactly. but, It works well as Plan B.
function playSound( path, loop=false ) {
local sound = fe.add_sound( path, true );
if( ! loop && ! sound.playing ) {
sound.playing = true;
}
if( loop ) {
fe.add_ticks_callback( this, "loopSound" )
}
function loopSound( ttime ) {
if( ! sound.playing ) {
sound.playing = true;
}
}
}
help a friend....