author | Tero Marttila <terom@fixme.fi> |
Fri, 19 Dec 2008 02:25:44 +0200 | |
branch | terom-mini |
changeset 10442 | 7089fa402bfd |
parent 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
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:
7170
diff
changeset
|
3 |
/** @file bemidi.cpp Support for BeOS midi. */ |
6481
85ad87daf4b0
(svn r9662) -Documentation: Doxygen corrections and @file omissions
belugas
parents:
6247
diff
changeset
|
4 |
|
2192
6a4c2d020975
(svn r2707) Missed the paths in the BeOS MIDI player, sorry for all the noise
tron
parents:
2186
diff
changeset
|
5 |
#include "../stdafx.h" |
6a4c2d020975
(svn r2707) Missed the paths in the BeOS MIDI player, sorry for all the noise
tron
parents:
2186
diff
changeset
|
6 |
#include "../openttd.h" |
6a4c2d020975
(svn r2707) Missed the paths in the BeOS MIDI player, sorry for all the noise
tron
parents:
2186
diff
changeset
|
7 |
#include "bemidi.h" |
531 | 8 |
|
9 |
// BeOS System Includes |
|
10 |
#include <MidiSynthFile.h> |
|
11 |
||
2173 | 12 |
static BMidiSynthFile midiSynthFile; |
531 | 13 |
|
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:
6481
diff
changeset
|
14 |
static FMusicDriver_BeMidi iFMusicDriver_BeMidi; |
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:
6481
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:
6481
diff
changeset
|
16 |
const char *MusicDriver_BeMidi::Start(const char * const *parm) |
531 | 17 |
{ |
18 |
return NULL; |
|
19 |
} |
|
20 |
||
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:
6481
diff
changeset
|
21 |
void MusicDriver_BeMidi::Stop() |
531 | 22 |
{ |
23 |
midiSynthFile.UnloadFile(); |
|
24 |
} |
|
25 |
||
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:
6481
diff
changeset
|
26 |
void MusicDriver_BeMidi::PlaySong(const char *filename) |
531 | 27 |
{ |
28 |
bemidi_stop(); |
|
29 |
entry_ref midiRef; |
|
30 |
get_ref_for_path(filename, &midiRef); |
|
31 |
midiSynthFile.LoadFile(&midiRef); |
|
32 |
midiSynthFile.Start(); |
|
33 |
} |
|
34 |
||
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:
6481
diff
changeset
|
35 |
void MusicDriver_BeMidi::StopSong() |
531 | 36 |
{ |
37 |
midiSynthFile.UnloadFile(); |
|
38 |
} |
|
39 |
||
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:
6481
diff
changeset
|
40 |
bool MusicDriver_BeMidi::IsSongPlaying() |
531 | 41 |
{ |
42 |
return !midiSynthFile.IsFinished(); |
|
43 |
} |
|
44 |
||
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:
6481
diff
changeset
|
45 |
void MusicDriver_BeMidi::SetVolume(byte vol) |
531 | 46 |
{ |
47 |
fprintf(stderr, "BeMidi: Set volume not implemented\n"); |
|
48 |
} |