Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F126719
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/util/music-player.h b/util/music-player.h
index ee806086..1fcc53c8 100644
--- a/util/music-player.h
+++ b/util/music-player.h
@@ -1,84 +1,82 @@
#ifndef _paintown_music_player_h
#define _paintown_music_player_h
#ifdef USE_SDL
/* for Uint8 */
#include <SDL.h>
#endif
struct DUH;
struct DUH_SIGRENDERER;
#ifdef USE_ALLEGRO
struct AL_DUH_PLAYER;
#endif
-#ifdef USE_SDL
class Music_Emu;
-#endif
namespace Util{
class MusicPlayer{
public:
MusicPlayer();
virtual void play() = 0;
virtual void poll() = 0;
virtual void pause() = 0;
virtual void setVolume(double volume) = 0;
virtual ~MusicPlayer();
};
/* uses the GME library, plays nintendo music files and others */
class GMEPlayer: public MusicPlayer {
public:
GMEPlayer(const char * path);
virtual void play();
virtual void poll();
virtual void pause();
virtual void setVolume(double volume);
virtual ~GMEPlayer();
protected:
#ifdef USE_SDL
static void mixer(void * arg, Uint8 * stream, int length);
void render(Uint8 * stream, int length);
#endif
double volume;
Music_Emu * emulator;
};
/* interface to DUMB, plays mod/s3m/xm/it */
class DumbPlayer: public MusicPlayer {
public:
DumbPlayer(const char * path);
virtual void play();
virtual void poll();
virtual void pause();
virtual void setVolume(double volume);
virtual ~DumbPlayer();
static const int FREQUENCY = 22050;
protected:
DUH * loadDumbFile(const char * path);
#ifdef USE_SDL
static void mixer(void * player, Uint8 * stream, int length);
void render(Uint8 * stream, int length);
#endif
protected:
#ifdef USE_ALLEGRO
AL_DUH_PLAYER * player;
#endif
DUH * music_file;
#ifdef USE_SDL
DUH_SIGRENDERER * renderer;
#endif
double volume;
};
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 12:42 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69082
Default Alt Text
(1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline