usbloadergx/source/libwiigui/GuiBGM.h
dimok321 1d9b8576e3 *Changed DeviceThreadPriority for startup. Now it detects the HDD faster and when it is detected it goes into idle mode again.
*Fixed filebrowser to cancel without applying the path
*Added A BGM Class
*Removed the BGM menu now.

You can now choose a file with the filebrowser which you want to play. This file will be played and all .mp3 .ogg and .wav in the same directory enlisted as a Playlist.
If you choose Loop Directory mode than the files are played one after another. You can also choose a play random music from directory mode.
2010-01-08 09:03:40 +00:00

46 lines
963 B
C++

/****************************************************************************
* SettingsPrompts
* USB Loader GX 2009
*
* Backgroundmusic
***************************************************************************/
#ifndef _BGM_H_
#define _BGM_H_
#include "libwiigui/gui.h"
enum
{
ONCE = 0,
LOOP,
RANDOM_BGM,
DIR_LOOP
};
class GuiBGM : public GuiSound
{
public:
GuiBGM(const u8 *s, int l, int v);
~GuiBGM();
bool Load(const char *path);
bool LoadStandard();
bool ParsePath(const char * folderpath);
bool PlayNext();
bool PlayPrevious();
bool PlayRandom();
void SetLoop(bool l);
void SetLoop(int l);
void UpdateState();
protected:
void AddEntrie(const char * filename);
void ClearList();
int currentPlaying;
int loopMode;
char * currentPath;
std::vector<char *> PlayList;
};
#endif