Well, now that you mention it.. yeah I do notice a little frame skip/stutter when the next song gets loaded. I'm not really sure there's much that can be done about it though.. I don't think you can buffer or preload things with PLAYMUSIC.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
// --------------------------------- //
// Project: zombietest
// Start: Wednesday, May 09, 2012
// IDE Version: 10.283
GLOBAL CurrentSong%
SUB LoadSongs:
LOCAL audioext$ = ".mp3"
LOCAL files$[]
?IF ANDROID
audioext$ = ".ogg"
?ENDIF
// Grab the number of songs
LOCAL num = MOD(GETFILELIST("*" + audioext$, files$[]), 0x10000)
DIM songs$[num]
// skip 2 because '.' and '..' count
FOR i = 2 TO BOUNDS(files$[], 0) - 1
songs$[i - 2] = files$[i]
DEBUG "Found song: " + songs$[i - 2] + "\n"
NEXT
GOSUB ShuffleSongs
CurrentSong = 0
ENDSUB
SUB ShuffleSongs:
LOCAL num%
LOCAL itemAtIndex$
// Run through each song and shuffle it's order
FOR i = BOUNDS(songs$[], 0) - 1 TO 0 STEP -1
num = RND(i)
SWAP songs$[num], songs$[i]
NEXT
ENDFUNCTION
SUB RunMusic:
IF NOT ISMUSICPLAYING()
INC CurrentSong
IF CurrentSong >= LEN(songs$[]) THEN CurrentSong = 0
PLAYMUSIC songs$[CurrentSong], FALSE
DEBUG "Started playing song: " + songs$[CurrentSong] + "\n"
ENDIF
ENDSUB
#import "TestFlight.h"
extern "C" void GLB_Launch_Feedback()
{
[TestFlight performSelectorOnMainThread:@selector(openFeedbackView) withObject: nil waitUntilDone: YES];
}
?IFDEF IPHONE
IMPORT "C" void GLB_Launch_Feedback()
?ELSE
FUNCTION GLB_Launch_Feedback:
ENDFUNCTION
?ENDIF