Files @ r10673:d53513e30781
Branch filter:

Location: cpp/openttd-patchpack/source/src/music/extmidi.h

translators
(svn r14977) -Update: WebTranslator2 update to 2009-01-10 18:44:17
arabic_egypt - 4 fixed by khaloofah (4)
brazilian_portuguese - 26 fixed by tucalipe (26)
bulgarian - 3 fixed by Ar4i (3)
catalan - 3 fixed by arnaullv (3)
croatian - 35 fixed by tifached (35)
czech - 52 fixed, 10 changed by Hadez (62)
danish - 4 fixed by ThomasA (4)
dutch - 6 fixed by Excel20 (4), habell (2)
finnish - 15 fixed by UltimateSephiroth (15)
french - 15 fixed by glx (15)
hungarian - 6 fixed by alyr (6)
indonesian - 6 fixed, 64 changed by fanioz (70)
italian - 3 fixed, 1 changed by lorenzodv (4)
portuguese - 6 fixed by rmrebelo (6)
romanian - 6 fixed by kkmic (6)
/* $Id$ */

/** @file extmidi.h Base support for playing music via an external application. */

#ifndef MUSIC_EXTERNAL_H
#define MUSIC_EXTERNAL_H

#include "music_driver.hpp"

class MusicDriver_ExtMidi: public MusicDriver {
private:
	char *command;
	char song[MAX_PATH];
	pid_t pid;

	void DoPlay();
	void DoStop();

public:
	/* virtual */ const char *Start(const char * const *param);

	/* virtual */ void Stop();

	/* virtual */ void PlaySong(const char *filename);

	/* virtual */ void StopSong();

	/* virtual */ bool IsSongPlaying();

	/* virtual */ void SetVolume(byte vol);
};

class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> {
public:
	static const int priority = 1;
	/* virtual */ const char *GetName() { return "extmidi"; }
	/* virtual */ const char *GetDescription() { return "External MIDI Driver"; }
	/* virtual */ Driver *CreateInstance() { return new MusicDriver_ExtMidi(); }
};

#endif /* MUSIC_EXTERNAL_H */