summaryrefslogtreecommitdiff
path: root/src/music/null_m.h
blob: 2b7be75816b6b2067418c6260a27b1c96a4554ed (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
/* $Id$ */

#ifndef MUSIC_NULL_H
#define MUSIC_NULL_H

#include "music_driver.hpp"

class MusicDriver_Null: public MusicDriver {
public:
	/* virtual */ bool CanProbe() { return false; }

	/* virtual */ const char *Start(const char * const *param) { return NULL; }

	/* virtual */ void Stop() { }

	/* virtual */ void PlaySong(const char *filename) { }

	/* virtual */ void StopSong() { }

	/* virtual */ bool IsSongPlaying() { return true; }

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

class FMusicDriver_Null: public MusicDriverFactory<FMusicDriver_Null> {
public:
	/* virtual */ const char *GetName() { return "null"; }
	/* virtual */ const char *GetDescription() { return "Null Music Driver"; }
	/* virtual */ Driver *CreateInstance() { return new MusicDriver_Null(); }
};

#endif /* MUSIC_NULL_H */