blob: c1b8c8a77d4a548d1e64fc1269b72941d86b2db4 (
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
33
|
/* $Id$ */
/** @file sound_driver.hpp Base for all sound drivers. */
#ifndef SOUND_SOUND_DRIVER_HPP
#define SOUND_SOUND_DRIVER_HPP
#include "../driver.h"
class SoundDriver: public Driver {
public:
/* Called once every tick */
virtual void MainLoop() {}
};
class SoundDriverFactoryBase: public DriverFactoryBase {
};
template <class T>
class SoundDriverFactory: public SoundDriverFactoryBase {
public:
SoundDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_SOUND, ((T *)this)->priority); }
/**
* Get the long, human readable, name for the Driver-class.
*/
const char *GetName();
};
extern SoundDriver *_sound_driver;
extern char *_ini_sounddriver;
#endif /* SOUND_SOUND_DRIVER_HPP */
|