(svn r27729) -Codechange: Do not count static NewGRF when checking for the maximum...
[openttd.git] / src / music / bemidi.cpp
blob2bc20747630289442dc4c4f404285f1b7059c87a
1 /* $Id$ */
3 /*
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/>.
8 */
10 /** @file bemidi.cpp Support for BeOS midi. */
12 #include "../stdafx.h"
13 #include "../openttd.h"
14 #include "bemidi.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)
29 return NULL;
32 void MusicDriver_BeMidi::Stop()
34 midiSynthFile.UnloadFile();
37 void MusicDriver_BeMidi::PlaySong(const char *filename)
39 this->Stop();
40 entry_ref midiRef;
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");