blob: ab5634cca7f882b6d293855d50970a7e8b5d6cdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* $Id$ */
/** @file bemidi.cpp */
#include "../stdafx.h"
#include "../openttd.h"
#include "bemidi.h"
// BeOS System Includes
#include <MidiSynthFile.h>
static BMidiSynthFile midiSynthFile;
static FMusicDriver_BeMidi iFMusicDriver_BeMidi;
const char *MusicDriver_BeMidi::Start(const char * const *parm)
{
return NULL;
}
void MusicDriver_BeMidi::Stop()
{
midiSynthFile.UnloadFile();
}
void MusicDriver_BeMidi::PlaySong(const char *filename)
{
bemidi_stop();
entry_ref midiRef;
get_ref_for_path(filename, &midiRef);
midiSynthFile.LoadFile(&midiRef);
midiSynthFile.Start();
}
void MusicDriver_BeMidi::StopSong()
{
midiSynthFile.UnloadFile();
}
bool MusicDriver_BeMidi::IsSongPlaying()
{
return !midiSynthFile.IsFinished();
}
void MusicDriver_BeMidi::SetVolume(byte vol)
{
fprintf(stderr, "BeMidi: Set volume not implemented\n");
}
|