mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 15:14:18 +01:00
acb1e5a651
it will fly in for 3 seconds and then fly out again
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#ifndef _MUSICPLAYER_H
|
|
#define _MUSICPLAYER_H
|
|
|
|
#include <string>
|
|
#include "gui_sound.h"
|
|
#include "config/config.hpp"
|
|
#include "wstringEx/wstringEx.hpp"
|
|
|
|
using namespace std;
|
|
|
|
class MusicPlayer
|
|
{
|
|
public:
|
|
void cleanup();
|
|
void Init(Config &cfg, string musicDir, string themeMusicDir);
|
|
void Tick(bool attenuate);
|
|
|
|
void SetVolume(u8 volume);
|
|
void SetMaxVolume(u8 volume);
|
|
u8 GetVolume() { return m_music_current_volume; };
|
|
u8 GetMaxVolume() { return m_music_volume; };
|
|
|
|
void Previous();
|
|
void Next();
|
|
void StopAndSetPos();
|
|
|
|
bool IsStopped() { return m_stopped; };
|
|
|
|
/* For our GUI */
|
|
wstringEx GetFileName();
|
|
bool SongChanged();
|
|
time_t DisplayTime;
|
|
protected:
|
|
void Play();
|
|
void Stop();
|
|
bool PosFromPrevFile();
|
|
void LoadCurrentFile();
|
|
void ScanDirectories(const char *directory);
|
|
|
|
u8 m_music_volume;
|
|
u8 m_music_current_volume;
|
|
u8 m_fade_rate;
|
|
int CurrentPosition;
|
|
bool m_stopped;
|
|
bool m_changed;
|
|
|
|
GuiSound MusicFile;
|
|
vector<string> m_music_files;
|
|
vector<string>::iterator m_current_music;
|
|
};
|
|
|
|
extern MusicPlayer m_music;
|
|
|
|
#endif |