Checking if BGM is finished

Started by Memor-X, January 11, 2012, 01:49:39 am

Previous topic - Next topic

Memor-X

i thought up a kick ass way to do some music while i was playing Fate/Stay Night, i break up the file into smaller segments that can be added at the end of each other in any order and sound seamless, the Rivy battle Music in Chaos Project be the best example of a song that could be done like this and it's one everyone would have heard

anyway, i am wondering if there is a way to check if a BGM is playing or if it's stopped, it will save a lot of work having to calculate just how many frames i should wait

this is the pseudo code i thought up


play segment 1
loop
    if bgm != playing
         num = random 1 - 5
         play segment num
    end
   
    if stopbgm == true
         break loop
    end
repeat


naturals i don't plan to replace all my music like this, just certain scenes like game over and the title screen

EDIT: it would also help if the method can be used in ARCed as well if that makes a difference

Blizzard

January 11, 2012, 02:20:17 am #1 Last Edit: January 11, 2012, 02:23:55 am by Blizzard
ARC won't support this in the very first release, but you can expect a quick update afterwards that will allow you to queue music tracks to be played like a "playlist" which will even be able to loop the playlist beginning from another track than the first one.

EDIT: In CP I did that through a sound effect SE played shortly before engaging into battle that then served as "intro" to the actual track.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.