Files @ r8781:bd977c904a17
Branch filter:

Location: cpp/openttd-patchpack/source/src/music/bemidi.cpp

bjarni
(svn r12482) -Fix: [build train] we don't need to have a depot in order to just check the price of a rail vehicle so don't check for compatible rails on the tile either
also wagons will only need tracks they can drive on in order to be build so there is no reason to check for power in the depot
/* $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");
}