File diff r23496:661d21df67d7 → r23497:a0ab44ebd2fa
src/music/null_m.h
Show inline comments
 
@@ -17,25 +17,25 @@
 
/** The music player that does nothing. */
 
class MusicDriver_Null : public MusicDriver {
 
public:
 
	/* virtual */ const char *Start(const char * const *param) { return NULL; }
 
	const char *Start(const char * const *param) override { return NULL; }
 

	
 
	/* virtual */ void Stop() { }
 
	void Stop() override { }
 

	
 
	/* virtual */ void PlaySong(const MusicSongInfo &song) { }
 
	void PlaySong(const MusicSongInfo &song) override { }
 

	
 
	/* virtual */ void StopSong() { }
 
	void StopSong() override { }
 

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

	
 
	/* virtual */ void SetVolume(byte vol) { }
 
	/* virtual */ const char *GetName() const { return "null"; }
 
	void SetVolume(byte vol) override { }
 
	const char *GetName() const override { return "null"; }
 
};
 

	
 
/** Factory for the null music player. */
 
class FMusicDriver_Null : public DriverFactoryBase {
 
public:
 
	FMusicDriver_Null() : DriverFactoryBase(Driver::DT_MUSIC, 1, "null", "Null Music Driver") {}
 
	/* virtual */ Driver *CreateInstance() const { return new MusicDriver_Null(); }
 
	Driver *CreateInstance() const override { return new MusicDriver_Null(); }
 
};
 

	
 
#endif /* MUSIC_NULL_H */