author | peter1138 |
Tue, 22 Jan 2008 07:27:06 +0000 | |
changeset 8374 | 7a1b6c89cb89 |
parent 7193 | d46cbf314baf |
child 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
2171
60334c9ca477
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff
changeset
|
3 |
#ifndef MUSIC_EXTERNAL_H |
60334c9ca477
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff
changeset
|
4 |
#define MUSIC_EXTERNAL_H |
60334c9ca477
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff
changeset
|
5 |
|
7170
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
6 |
#include "music_driver.hpp" |
2171
60334c9ca477
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff
changeset
|
7 |
|
7170
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
8 |
class MusicDriver_ExtMidi: public MusicDriver { |
7172
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
9 |
private: |
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
10 |
char song[MAX_PATH]; |
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
11 |
pid_t pid; |
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
12 |
|
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
13 |
void DoPlay(); |
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
14 |
void DoStop(); |
ca55dbe776a3
(svn r10446) -Codechange: Move extmidi's global data into its class.
peter1138
parents:
7170
diff
changeset
|
15 |
|
7170
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
16 |
public: |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
17 |
/* virtual */ const char *Start(const char * const *param); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
18 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
19 |
/* virtual */ void Stop(); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
20 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
21 |
/* virtual */ void PlaySong(const char *filename); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
22 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
23 |
/* virtual */ void StopSong(); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
24 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
25 |
/* virtual */ bool IsSongPlaying(); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
26 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
27 |
/* virtual */ void SetVolume(byte vol); |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
28 |
}; |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
29 |
|
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
30 |
class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> { |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
31 |
public: |
7193
d46cbf314baf
(svn r10471) -Codechange: implement driver probing priority so that 'preferred' drivers are loaded first
peter1138
parents:
7172
diff
changeset
|
32 |
static const int priority = 1; |
7170
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
33 |
/* virtual */ const char *GetName() { return "extmidi"; } |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
34 |
/* virtual */ const char *GetDescription() { return "External MIDI Driver"; } |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
35 |
/* virtual */ Driver *CreateInstance() { return new MusicDriver_ExtMidi(); } |
923946ec324f
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
peter1138
parents:
6124
diff
changeset
|
36 |
}; |
2171
60334c9ca477
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
diff
changeset
|
37 |
|
6124
9f822ae6c086
(svn r8860) -Cleanup: some style changes, proper #endif comments, variable initialisation, WINCE ifdef and a vsprintf to vsnprintf change.
Darkvater
parents:
5475
diff
changeset
|
38 |
#endif /* MUSIC_EXTERNAL_H */ |