src/sound/null_s.h
branchnoai
changeset 9631 8a2d1c2ceb88
parent 6314 f738bcf05ad6
child 7689 011afceb33b5
--- a/src/sound/null_s.h	Wed Jun 27 01:01:16 2007 +0000
+++ b/src/sound/null_s.h	Sat Jul 07 09:20:52 2007 +0000
@@ -3,8 +3,22 @@
 #ifndef SOUND_NULL_H
 #define SOUND_NULL_H
 
-#include "../hal.h"
+#include "sound_driver.hpp"
 
-extern const HalSoundDriver _null_sound_driver;
+class SoundDriver_Null: public SoundDriver {
+public:
+	/* virtual */ bool CanProbe() { return false; }
+
+	/* virtual */ const char *Start(const char * const *param) { return NULL; }
+
+	/* virtual */ void Stop() { }
+};
+
+class FSoundDriver_Null: public SoundDriverFactory<FSoundDriver_Null> {
+public:
+	/* virtual */ const char *GetName() { return "null"; }
+	/* virtual */ const char *GetDescription() { return "Null Sound Driver"; }
+	/* virtual */ Driver *CreateInstance() { return new SoundDriver_Null(); }
+};
 
 #endif /* SOUND_NULL_H */