author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
6072
2eb3e6ecba20
(svn r8805) -Codechange (r8757): DO set eol-style and keywords on new files...
Darkvater
parents:
6034
diff
changeset
|
1 |
/* $Id$ */ |
6034
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
2 |
|
9111
48ce04029fe4
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
7193
diff
changeset
|
3 |
/** @file libtimidity.h Base for LibTimidity music playback. */ |
48ce04029fe4
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
7193
diff
changeset
|
4 |
|
6034
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
5 |
#ifndef MUSIC_LIBTIMIDITY_H |
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
6 |
#define MUSIC_LIBTIMIDITY_H |
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
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:
6072
diff
changeset
|
8 |
#include "music_driver.hpp" |
6034
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
9 |
|
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:
6072
diff
changeset
|
10 |
class MusicDriver_LibTimidity: public MusicDriver { |
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:
6072
diff
changeset
|
11 |
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:
6072
diff
changeset
|
12 |
/* 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:
6072
diff
changeset
|
13 |
|
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:
6072
diff
changeset
|
14 |
/* 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:
6072
diff
changeset
|
15 |
|
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:
6072
diff
changeset
|
16 |
/* 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:
6072
diff
changeset
|
17 |
|
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:
6072
diff
changeset
|
18 |
/* 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:
6072
diff
changeset
|
19 |
|
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:
6072
diff
changeset
|
20 |
/* 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:
6072
diff
changeset
|
21 |
|
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:
6072
diff
changeset
|
22 |
/* 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:
6072
diff
changeset
|
23 |
}; |
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:
6072
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:
6072
diff
changeset
|
25 |
class FMusicDriver_LibTimidity: public MusicDriverFactory<FMusicDriver_LibTimidity> { |
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:
6072
diff
changeset
|
26 |
public: |
7193
d46cbf314baf
(svn r10471) -Codechange: implement driver probing priority so that 'preferred' drivers are loaded first
peter1138
parents:
7170
diff
changeset
|
27 |
static const int priority = 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:
6072
diff
changeset
|
28 |
/* virtual */ const char *GetName() { return "libtimidity"; } |
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:
6072
diff
changeset
|
29 |
/* virtual */ const char *GetDescription() { return "LibTimidity 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:
6072
diff
changeset
|
30 |
/* virtual */ Driver *CreateInstance() { return new MusicDriver_LibTimidity(); } |
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:
6072
diff
changeset
|
31 |
}; |
6034
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
32 |
|
7a125490f55c
(svn r8757) -Add: added libtimidity music driver (it is a nice small library simular to timidity via extmidi)
truelight
parents:
diff
changeset
|
33 |
#endif /* MUSIC_LIBTIMIDITY_H */ |