1 /* $Id: bemidi.cpp 22410 2011-05-02 16:14:23Z rubidium $ */
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file bemidi.cpp Support for BeOS midi. */
12 #include "../stdafx.h"
13 #include "../openttd.h"
16 /* BeOS System Includes */
17 #include <MidiSynthFile.h>
19 #include "../safeguards.h"
21 /** The file we're playing. */
22 static BMidiSynthFile midiSynthFile
;
24 /** Factory for BeOS' midi player. */
25 static FMusicDriver_BeMidi iFMusicDriver_BeMidi
;
27 const char *MusicDriver_BeMidi::Start(const char * const *parm
)
32 void MusicDriver_BeMidi::Stop()
34 midiSynthFile
.UnloadFile();
37 void MusicDriver_BeMidi::PlaySong(const char *filename
)
41 get_ref_for_path(filename
, &midiRef
);
42 midiSynthFile
.LoadFile(&midiRef
);
43 midiSynthFile
.Start();
46 void MusicDriver_BeMidi::StopSong()
48 midiSynthFile
.UnloadFile();
51 bool MusicDriver_BeMidi::IsSongPlaying()
53 return !midiSynthFile
.IsFinished();
56 void MusicDriver_BeMidi::SetVolume(byte vol
)
58 fprintf(stderr
, "BeMidi: Set volume not implemented\n");