# null_m.h

    00001 /* $Id: null_m.h 10471 2007-07-07 20:31:23Z peter1138 $ */
    00002
    00003 #ifndef MUSIC_NULL_H
    00004 #define MUSIC_NULL_H
    00005
    00006 #include "music_driver.hpp"
    00007
    00008 class MusicDriver_Null: public MusicDriver {
    00009 public:
    00010   /* virtual */ const char *Start(const char * const *param) { return NULL; }
    00011
    00012   /* virtual */ void Stop() { }
    00013
    00014   /* virtual */ void PlaySong(const char *filename) { }
    00015
    00016   /* virtual */ void StopSong() { }
    00017
    00018   /* virtual */ bool IsSongPlaying() { return true; }
    00019
    00020   /* virtual */ void SetVolume(byte vol) { }
    00021 };
    00022
    00023 class FMusicDriver_Null: public MusicDriverFactory<FMusicDriver_Null> {
    00024 public:
    00025   static const int priority = 0;
    00026   /* virtual */ const char *GetName() { return "null"; }
    00027   /* virtual */ const char *GetDescription() { return "Null Music Driver"; }
    00028   /* virtual */ Driver *CreateInstance() { return new MusicDriver_Null(); }
    00029 };
    00030
    00031 #endif /* MUSIC_NULL_H */